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
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