Email Sending Speed Considerations
There are many many factors that determine the speed of sending, and with some testing you can pinpoint what exactly is causing a bottleneck.
Some factors that determine the speed include, but are not limited to; database design, scripting, size of the email (e.g. attachments, inline images, etc), speed of the computer running the plug-in, location of the mail server in relation to the the plug-in, connection speed between the mail server and client, and network congestion or a heavily used mail server.
To determine the bottleneck, it will require testing, more testing, and even more testing. Each test will rule out a possible factor, so in the end, the process is simply trial and error.
The database you are using could be causing the slow sending. Things such as scripting, database design, or even corruption could be causing this. The first thing to try is a new database. Create a brand new, simple database that sends a very simple email (To, From, Subject, and short Text Body).
If you are sending a mass mail, make sure you are using the Connect and Disconnect functions. See the Examples we provide that do Mass Mailing for scripting that takes advantage of this.
Also, the plug-in has the ability to cache whole parts of the email so that it does not have to re-encode them with every record. The idea is to set everything that is the same for every record (e.g. From Address, Subject, etc.) before your loop, and then only set those things that are different (e.g. To address, Body, etc) within the loop. This allows the plug-in to encode things like the Subject only once and then send it to all the records. The parts that are inside and outside the loop are specific to your mailing, so only you can decide exactly what your script needs to look like.
For example: If you wanted to send a mass mailing that had a Body that was unique for each recipient, then your script may look like the following.
Set Field[ DB::Results ;
SMTPit_Clear & “¶” &
SMTPit_SetHost( “smtp.domain.com” ; 465 ) & “¶” &
SMTPit_SetAuthentication( “CRAM-MD5” ; “username” ; “password” ; “BeforeConnect” ) & “¶” &
SMTPit_SetFrom( “"John Smith" firstname.lastname@example.org” ) & “¶” &
SMTPit_SetSubject( “Weekend Update” ) & “¶” &
Go To Record/Request/Page[First]
Set Field[ DB::Results ;
SMTPit_SetTo( DB:To ) & “¶” &
SMTPit_SetBody( DB::TextBody; “Text”)
Set Field[ DB::SendResult ; SMTPit_Send ]
Go To Record/Request/Page[Next; Exit After Last]
Set Field[ DB::Results ; SMTPit_Disconnect ]
Note, the above script is very basic does not include error checking and is simply meant to display the proper way to take advantage of the caching the plug-in does.
The information in your email could be what is slowing the sending. Using the same new database as before, start adding more pieces (HTML Body, Attachments, etc) of the email until you get the full email you are planning to send. Send an email between each piece that you add to determine if one of the pieces of the email is causing the slowdown.
Computer running the plug-in
To rule out something strange with your specific computer, try opening your database on a different computer and sending the email from the new computer.
If your database is hosted by FileMaker Server, try taking the database off the server and running it on your local computer. Open it in FileMaker Pro and see if the email speed changes.
Connection between the Mail Server and the plug-in
If you normally send email from your internet connection at work, try sending the email from your home internet connection or some other location. Note, if you run your own mail server, it would be best to be on the same network as the mail server.
To rule out something with your mail server slowing your email, try sending through a different mail server. If you do not have another mail server available, sign up for a free webmail account, such as Gmail (www.gmail.com). We regularly send through Gmail’s mail servers and it usually takes about 2–4 seconds to send one text email.