Multiple Recipients Using -tolist
Previous Topic  Next Topic 



This example demonstrates how to send an email to multiple recipients using -tolist. Each recipient listed in a text file will receive its own email addressed to that recipient. .


Prepared Example Files



The archive contains two files:



Batch File Contents


This is the content of the batch file:


netmailbot.exe -tolist "MultipleRecipientsTolist.txt" -from -logfile "c:\tmp\log.txt" -server localhost -subject "-tolist example" -body "This is a plain text message sent with NetMailBot" -recipientlimit 1




  1. Unzip the file. This will produce a directory called "MultipleRecipientsTolist". Open this directory.
  2. Open the "MultipleRecipientsTolist.txt" text file.
  3. Change all of the email addresses to your email address. The email addresses can all be the same.
  4. Open Notepad and edit the batch file "MultipleRecipientsTolist.bat". Note these important parameters used in the batch file:



  1. Invoke the batch file.
  2. NetMailbot should start up and, upon finishing, the email addresses specified in the list should each receive an email message.


NOTE: If you use the same recipient email address twice in the tolist, e.g. "", the use of -recipientlimit 1 forces NetMailBot to only put one email address in the "To:" field at a time. Thus, NetMailBot will send as many email as there are addresses listed in the tolist. In this example, "" would therefore receive two identical emails, each with a header looking like the following:



Date:     Thursday, July 01, 2004 2:52 PM


Subject:  Plain Text Message