• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 11. FileMaker and Other Programs > Using Scripts to Send Bulk Email

Using Scripts to Send Bulk Email

By adapting the script created in “To create an email script” on the previous page, you can create a script to send email to every person in an entire database or within a found set.

To send bulk email:

Follow the steps in “To create an email script.”

If you want to send bulk email to only a subset of people, do a Find to create a found set of the contacts you want to reach.

Choose Scripts > ScriptMaker.

In the Define Scripts dialog box, click the script you just created, then click Duplicate (Figure 11.11).

Figure 11.11. Since this script is very similar to an existing one, it's easier to duplicate the original and edit it than to create a new script from scratch.

Rename the script, then click Rename. We call our new script Broadcast Email.

Double-click on the new script to open the Script Definition dialog box.

In the script assembly window on the right, click the Send Mail step.

Because bulk email can be interpreted as spam (junk email) or cause embarrassment if you run this script by mistake, we'll insert a dialog box to confirm that you really want to run this script. In the script step list on the left, scroll down to Miscellaneous and double-click Show Message (Figure 11.12).

Figure 11.12. Use Show Message to add a dialog box prompt to confirm that you want to send bulk email.

Move the Show Message step above Send Mail, then double-click on it (Figure 11.13).

Figure 11.13. Your message should appear before your Send Mail step takes place.

When the Specify Message dialog box appears, type a message like “Are you sure you want to send this email to everyone?” in the Message Text box (Figure 11.14).

Figure 11.14. The message text warns that the email will be sent to everyone in the found set.

In the Button Captions section, type No in the First (default) box and Yes in the Second box (Figure 11.15).Click OK.

Figure 11.15. The default is set to No, the least dangerous choice.

In the script step list on the left in the Script Definition dialog box, scroll up to the Control section and double-click If (Figure 11.16). In Options, click Specify.

Figure 11.16. The If step will check which button the user clicked and act accordingly.

When the Specify Calculation dialog box appears, click the View drop-down list on the right and choose Status functions.

From the list of status functions, double-click Status (CurrentMessageChoice) (Figure 11.17).

Figure 11.17. The CurrentMessageChoice status function returns a number corresponding to the button you click in the message box.

Click to the right of the parentheses. Double-click the = operator button, then type 1 (Figure 11.18). Click OK.

Figure 11.18. The value for the No button is 1.

This step sets the default choice to No, so you won't send bulk email unless you are certain you want to.

In the script step list on the left of the Script Definition dialog box, double-click Exit Script (Figure 11.19). In the script assembly window, double-click the Send Mail step.

Figure 11.19. If the choice is No, the script ends without sending the email.

When the Specify Mail dialog box appears, click the Specify button in the cc: section (Figure 11.20).

Figure 11.20. The Field Value for the cc: option is where you'll put the bulk mail addresses.

When the Specify Field dialog box appears, choose your email address field from the scrolling list.

Click the “Use all records in found set” radio button (Figure 11.21).

Figure 11.21. “Use all records in found set” will insert all the current email addresses into the cc: section of the email.

Click OK to save the change. Click OK to close the Specify Mail dialog box, OK again and then Done.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint