one email is going out with everyone listed on it and you want individual emails sent?
only one email to one recipient is being sent and you need emails to go out to everyone on the list?
One email is going out with everyone listed on it and I want individual emails sent.
Your email client requires the correct delimitter character between the list of email addresses, either ";" or ",". List puts the email addresses together as a list of values separated by a return character instead of the appropriate delimitter.
You need one of these two expressions:
Substitute ( List ( Factories::ContactEmail ) ; ¶ ; ";" )
Substitute ( List ( Factories::ContactEmail ) ; ¶ ; "," )
There's another problem with that If statement. It has no effect on your results as
FactoriesEmail::EmailToCategory = Factories::EmailToCategory
Will always be true statement so the list of emails will always be returned. An if statement like this makes no sense. If the expression were false, you'd get an error because send mail would be trying to send out an email with nothing in the "To" box.
Thanks! I am using the "if" statement to narrow down the list of factories that receive the emails. I have factories that make "ProductA", "ProductB" and "Both". I will want email to go to one of those categories and that is what the "if" statement checks. Although, now that I look at it, if "ProductA" is selected, the list should output all of the emails for the factories that produce "ProductA" and "Both".
How does the "Substitute" feature work? Can I use that to accomplish what I am trying to do and if so, where do I put that expression?
Your if statement won't do what you are expecting it to do.
You'll need to use a relationship based on the selected product options to limit what the list function returns. The substitute function replaces every carriage return (that's what ¶ represents) with either a semi-colon or a comma--use what works with your email client. So once you get the relationship issue figured out, you'd use one of the two expressions I posted previously in the same place you now have your If function.
Again, thank you very much. The relationship is built and it is pulling the correct email addresses using the expression you provided. However, separate emails are not being sent to each recipient. One email goes out and all of the recipients are listed in the "To" field. I am using the FileMaker SMTP email feature. Any ideas why one email is going out instead of an individual one to each recipient?
The method you are using should send the exact same email to all the listed email recipients.
Which delimitter does your email server require? Comma or semi-colon? Have you used the version of my calculation that substitutes this character for the carriage returns?
I used the semi-colon one and it works, but it puts all of the recipients in the "To" field and it sends one email out to all recipients.
I want a separate email to go to each recipient.
I am checking "Multiple Emails (one for each record in found set)" but it appears that it is just not working.
Then you can't use this method any more than you can open an email program, list a bunch of recipients in the to box and expect different emails to go out to each person you listed as a recipient.
You'll need to either pull up a found set of your recipients (each email address is in a separate record) and use the "Multiple emails, one for each record in found set" option or you'd need to loop through these same records and send individual emails to each.
I have a found set and each email address is in a separate record in this found set. What do I do to use the "Multiple emails, one for each record in found set"?
I tried this option and I could not get it to work. Thanks!
How didn't it work for you?
The trick is to work from a layout that refers to your found set of email addresses, but is still able to reference any fields needed in the calculated expressions that produce your email message.
Okay, so now it is sending individual emails. However, in the "To" part of the email, it lists all of the recipients. So lets say there are ten recipients, it sends out ten emails but lists all ten recipients in all of those emails in the "To" part. Does that make sense? Is there a way to get FileMaker to send out the ten emails and only have one recipient listed in the "To" part?
Don't use the list function for this, just reference the email addess field without anything else.