Script to send mail, choosing the most valid email address from two options.
Specific contacts in our database can be linked to either 1 and sometimes two email addresses.
I'm looking for a script that does the following
if email field 1 has an email address, when user sends email it goes to this email - email 1.
if email 1 is empty however, the email will be sent to the second email address - email 2.
the email should never go out to both email addresses.