>> Home > M5 Mailer: Take the Bulk out of email blasts Mailer Home | My Mach5 | Download | Support | Buy Mailer  
 
Online Manual

Welcome
Setup
Overview
Composing Details
Managing Data
List Management
Scripting
After Each Send  
COM Integration  
Include SubMailing  
Scheduling
More Help

Mailer Home


Untitled Document

Explore M5 Mailer

Take the bulk out of email! TM

Use your own data
Personal email merge
Send individual email
HTML and/or text
Handy email templates


Explore M5 Subscriber

Web-based list management made simple!

Simple subscribe tool
Opt-in confirmed
Track reads and clicks
Custom matching look
Free for up to
        5000 contacts

 

Mach5 Mailer Help Docs -- Undeliverable Messages

Post-Send Scripting in Mailer Gold

Mailer Gold allows you to execute a script after Mailer attempts to send each message. You can use this script to pass information back to your database about the status of each send attempt. You can also set Mailer to only pass information back to the database when Mailer successfully delivers the message to the server.

In your log file, a result code indicates what happened to each message. Here are the result codes:

Code Description
0 Successfully Sent
1 Did not match filter
2 Bad email address
3 Not all attachments found
4 Parsing the scripting language failed
5 Connection to External SMTP failed
6 Transmission of message to external SMTP failed
7 Transmission to Internal Server failed

 

Under the Mail menu choose Post-Process Script

You can specify what script to run after Mailer sends every message. You can also tell Mailer to execute the script only if it successfully delivers the message to the SMTP server.

Note that just because Mailer delivers the message to the server, that doesn't mean the message will be delivered to the recipient. But it does mean that Mailer has successfully sent the message to the relevant server.

Performance Issue: Because access to your data source must be sequential (you can't have several programs trying to update your data source at the same time), only one thread can run the post-process script at once. Mailer may send with 10 threads, but the post-process scripting happens one message at a time. For this reason, using post-process scripting may slow down your send operation. The performance penalty you experience depends upon the complexity of the script, the efficiency of the data source connection (Some ODBC drivers are slow), and the load on your machine.

Setup

Under the Mail Menu choose "Post-Process Script...". In this dialog, choose the script that you want to execute. Just as in PopMonger, all scripts must be surrounded by the Mailer external scripting delimiters <? and ?>. Mailer determines the kind of script to execute from the file extension in the same way that PopMonger does:

.vbs VBasic
.js JScript
.php PHP

After you choose your script, you can also tell Mailer to only execute the script if Mailer successfully sends the message. If you turn off this option, Mailer will execute the post-send script even after failed delivery attempts.

Variables

The same $mailer context variable that is available to Mailer message content scripts is also available to post-processing scripts. One additional value is available for post-processing: $mailer->sendResult(). This function returns the status number for the message send attempt, so you can determine why the message was not sent if it failed. Available status codes are documented here:

.vbs mailer.sendResult()
.js mailer.sendResult()
.php $mailer->sendResult()

Values returned by sendResult are as follows:

Code Description
0 Successfully Sent
1 Did not match filter
2 Bad email address
3 Not all attachments found
4 Parsing the scripting language failed
5 Connection to External SMTP failed
6 Transmission of message to external SMTP failed
7 Transmission to Internal Server failed

Determining if the operation is a test run

You can tell whether or not the mailing is from a Mailer "test run" also in your script. You can use a test run to test the functionality of your mailing, but if you are making a database operation during a live run, you may not want to actually change the database during a test run.

The testRun property returns true or false depending on whether or not the mailing is a test run.

.vbs mailer.testRun
.js mailer.testRun
.php $mailer->testRun

Reminder: For all versions of Mailer before 4.2: All scripts, including JavaScript and VBScript scripts, must be enclosed in the Mailer scripting delimiters. Make sure <? is at the beginning of your script, on the first line, and ?> is at the end on the last line. Mailer 4.2 and later versions do not require that these scripts are surrounded with the scripting delimiter.

For more information on scripting, please check out general scripting documentation.

Home   |   Site map   |   Analyzer   |   Mailer   |   PopMonger   |   Resources   |   Customers and Partners  |   Contact
Mach5 is a registered trademark of Mach5 Development.