This example demonstrates how to send an email using the mail merge features in NetMailBot. The database used is an MS Access database (Access 2000 version) which contains some sample data. An HTML file is used as the message body.
NOTE: You should change the email addresses in the Access database to your own email address(es) before running a test.
Using this feature requires Microsoft Access and working knowledge of creating and editing an MS Access database.
Prepared Example Files
The -bodyfile parameter in NetMailBot uses full paths. We have assumed a particular path as shown in the batch file contents below. Therefore, download this file to C:\tmp on your hard drive or edit the -bodyfile parameter to reflect wherever you unzip the archive.
The archive contains four files:
Batch File Contents
This is the content of the batch file:
netmailbot -to email@example.com -from firstname.lastname@example.org -subject "Mail Merge Example" -server localhost -logfile c:\tmp\log.txt -dsn "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\tmp\test.mdb" -dbquery "SELECT * FROM Customers" -dbemailcolumn "email" -dbreplacementids "$first_name$=first_name,$last_name$=last_name" -bodyfile "c:\tmp\body.html" -personalize