Checking for optional email address before sending email

Send email only when an optional secondary address is provided.

Overview

The issue occurs when an email action attempts to send to an empty field, triggering an invalid address error.
Use the Run Conditions feature in CF to check if the secondary email field is filled before triggering the separate email action.

Answered
ChronoForms v7
kg kgriffin 25 Jul, 2024

Hi-

I have a form where a secondary email address is not always entered due to certain circumstances. I need to be able to send an email to the secondary email address if it is filled out. If I try to include that field in the email action and it is empty, I get an Invalid Address error from the phpmailer.php file, so I have to use a separate email action that should only be triggered if that email address exists. How do I check for it before the email action is triggered?

Thanks.

kg kgriffin 25 Jul, 2024
Answer

Never mind. I temporarily forgot about Run Conditions. All fixed now.

This topic is locked and no more replies can be posted.