Multiple Recipients Using -tolist
Previous Topic  Next Topic 

Purpose

 

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 test@exclamationsoft.com -logfile "c:\tmp\log.txt" -server localhost -subject "-tolist example" -body "This is a plain text message sent with NetMailBot" -recipientlimit 1

 

Steps

 

  1. Unzip the MultipleRecipientsTolist.zip 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. "test@testcompany.com", 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, "test@testcompany.com" would therefore receive two identical emails, each with a header looking like the following:

 

From:     test@mymail.com

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

To:       test@testcompany.com

Subject:  Plain Text Message