Alternative Delimiters in an HTML Message Body
Previous Topic  Next Topic 



This example demonstrates how to use alternative delimiters in an HTML message body.


Prepared Example Files



The archive contains three files:



File Contents


This is the content of the batch file:


netmailbot -to -from -server -logfile c:\tmp\log.txt -dsn "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\AltHTMLDelimiters\;Extended properties=Text;" -dbquery "SELECT * FROM data.txt" -dbemailcolumn "to" -dbreplacementids "$firstname$=firstname,$lastname$=lastname" -bodyfile "msg.html" -personalize -debug


This is the content of the data.txt file:




This is the content of the msg.html file:




<font face="arial">

Dear $firstname$ $lastname$,<br><br>

Here is your monthy newsletter!







  1. Unzip the file. This will produce a directory called "AltHTMLDelimiters". Open this directory.
  2. Open Notepad and edit the batch file "AltHTMLDelimiters.bat". Change the values of the parameters -to, -from, and -server to two test email addresses of your choosing and your mail server. Depending on where you unzip the file, you may have to adjust the DSN string as well (the batch file assumes D:)
  3. Edit the data.txt file to contain at least one legitimate email address to which you have access, so that you can verify the results of the operation.
  4. Invoke the batch file by double-clicking the icon or straight from the command line.
  5. NetMailbot should start up and, upon finishing, the email addresses specified in the data file should each receive a customized email message.