1 of 1 people found this helpful
Sending with email client, SMTP server, webmail, or plugin??
#Perform a find to find all the records that contain an email address to which you plan to send the email
Go To Record [First]
#In the next step change ; to , if you need to use that delimitter for your email software
Set Variable [$EmailList; Value: $EmailList & "; " & YourTable::YourEmailField]
Go To Record [next; exit after last]
Set Field [YourTable::YourGlobalSendField; Right($EmailList; Length($EmailList) - 2 /* strip off the leading "; " */]
#Now you can use YourTable::YourGlobalSendField as your specified field to send out your email
However, to send one email using the recipients represented by all records in the found set,
you would have to have your script loop through all records and store the list of emails to a local variable or
to a global field, and then send the email using the 'one email' option and using that variable or global as your recipient.
Home > Sharing data > Saving, importing, and exporting data > Sending email messages based on record data >
Entering or editing SMTP options
The FileMaker Send Mail Script Step February 17, 2012
Sending HTML Email from FileMaker Posted by donovan11/02/2012 Demo databases available
2010 Filemaker Email Plugins Compared
Email Client Popularity
• 35.6% iOS Devices • 20.14% Outlook • 13.57% Hotmail • 11% Apple Mail • 9.85% Yahoo! Mail • 8.43% Gmail • 4.74% Android • 2.34% Windows Live Desktop • 1.03% Thunderbird • 0.79% AOL Mail
There are at least two ways that you can do this.
But how do you link your three tables in relationships? Can the same contact be linked to more than one Discipline?
An email address can be a field in contacts, so what is the purpose of your separate email table, to document all details of a particular email message?
The contacts only have one discipline. The tables are linked by discipline id.
The purpose of the email table is to allow a user to craft a message, select a group (by discipline) for each of the address fields needed and press send. The email is being sent via email client simply because it's the easiest solution, I may go the smtp route in the future. Once the email, with all necessary information is exported to the email client, I will then have a record for each email sent out. If there are any questions about a particular email in the future, this will save me from having to remember who sent the email, find out if they saved it, etc. since I can find everything I need in one place.
I gather that the list of email addresses can be different for each email address box in your Send Mail dialog. If they were the same, you could pull up a found set of contacts and use the "multiple addresses-every address in found set" option.
You'll need to check and see whether a list of email addresses uses a comma or a semi-colon between individual email addresses. I will assume a semi-colon in this example.
Define 3 DisciplineID fields in your email table: ToDiscID, BCCDiscID and CCDiscID. Link your emails table to 3 separate occurrences of your contacts table by each of these fields to the disciplineID field in contacts. Format them with value lists on your layout so that you can select a discipline by name and enter the ID number for it.
This would give you:
Emails::ToDiscID = ToContacts::DisciplineID
Emails::BCCDiscID = BCCContacts::DisciplineID
Emails::CCDiscID = CCContacts::DisciplineID
Then you can use this calculation to specify a list of email addresses for the To box in Send Mail:
Substitute ( List ( ToContacts::EmailAddress ) ; ¶ ; ";" )
Similar expressions referring to the EmailAddress field in each of the other two table occurrences will serve for the CC and BCC fields.