Multiple Recipients
Previous Topic  Next Topic 

Purpose

 

This example demonstrates how to send a single email to more than one recipient.

 

Prepared Example Files

 

 

The archive contains one file:

 

 

Batch File Contents

 

This is the content of the batch file:

 

netmailbot.exe -to test@exclamationsoft.com another@exclamationsoft.com -from test@exclamationsoft.com -logfile "c:\tmp\log.txt" -server localhost -subject "Plain Text Message" -body "This is a plain text message sent with NetMailBot"

 

Steps

 

  1. Unzip the MultipleRecipients.zip file. This will produce a directory called "MultipleRecipients". Open this directory.
  2. Open Notepad and edit the batch file "MultipleRecipients.bat". Change the values of the parameters -to, -from, and -server to two test recipient email addresses of your choosing, your email address, and your mail server.
  3. Invoke the batch file by double-clicking the icon or straight from the command line.
  4. NetMailbot should start up and, upon finishing, the email addresses specified with the -to parameter should each receive an email message.

 

NOTE: If you use the same recipient email address twice in this example, e.g. "test@testcompany.com", the

address will be listed twice in the "To:" field of the email received by the recipient. That is, the email header will

look like:

 

From:     test@mymail.com

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

To:       test@testcompany.com; test@testcompany.com

Subject:  Plain Text Message 

 

However, the recipient will only get one email. Such is the nature of SMTP!