Send your birthday greetings with AutoSender 2.0 !

Have you ever wanted to automatically send birthday greetings to your important friends and customers?

In today's example, we'll take a closer look at how we can combine the power of FileMaker Server 9 script scheduling with AutoSender for automatically sending mail messages from FileMaker Server at scheduled intervals.

birthday.jpg


Scenario
We start with a contacts database that contains at least email address and birthday information. What we want to do is to make sure that every morning birthday messages for that day are sent out automatically.
To do this, we'll set up the database for use with AutoSender, and run a daily schedule on FileMaker Server that will find the records you need.

It is recommended that you already have AutoSender running on your FileMaker Server (download the demo here) before continuing with this example. AutoSender requires FileMaker Server 9 or FileMaker Server 7/8 Advanced.

1. Download the Example file

bdexample1.png

Download here

The example file consists of a "contacts" and an "emails" table.
The script "find_birthdays_for_today" will create a mail record in the emails table, based on the contact information.
In this script, make changes to the 'from' e-mail address you will be using:

scripteditor2.png

2. Bring the file online on your server

3. Setup the AutoSender configuration

3.1 Create a new mail source in the AutoSender Config application
In order to ensure that messages from the emails table get sent out automatically, we need to add a configuration to AutoSender.
Depending on whether you are going to use XML or JDBC to connect to the database, enter the data as shown below:

asconfig_xml.png
asconfig_jdbc.png

3.2 Enter your SMTP server information

asconfig3.png

3.3 Enter field information for the Birthday Example database

asconfig4.png

3.4 Save your changes to activate the new mail source

4. Create a schedule to search for today's birthdays

4.1 Create a ScriptMaker script schedule on FileMaker Server

4.2 Select the Birthday Example database, and select the user "fmsscript" (no password) to login

fms1.png

4.3 Select the script "find_birthdays_for_today" - this script will find those people whose birthday it is today and based on that found set, loop through the records to create email messages

fms3.png

4.4 Make the script run daily

That's it !

This technique could also be used for e.g. sending statements to customers automatically, sending reports of out-of-stock items, sending out reminders for to do's from your GTD database, etc.

Leave a Reply

You must be logged in to post a comment.