Multiple Recipients Using -tolist

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.
  • Requirements
    • Working knowledge of creating and editing a batch file.

  • Example Download
    A working example can be downloaded, so that you can follow along with the example:
     Click Here ( 10KB)
    The downloadable example is a zip file that contains two files:
    • tolist.txt - The text file that contains a comma delimited list of email addresses.
    • tolist.bat - The batch file that will instruct NetMailBot to send the email message.

    Instructions for Download and Installation

    • Download the example zip file and save it to your hard drive
    • Create a directory on your C drive named "tmp"
    • Unzip all of the files in the example zip file into the newly created directory c:\tmp.

  • Steps
    1. Open the text file.
    2. Change all of the email addresses to your email address. The email addresses can all be the same.
    3. Close the text file.
    4. Open Notepad and edit the batch file mail_merge.bat.

      Some important parameters used in the batch file

      • Note the use of -tolist. This instructs NetMailBot to use the text file specified after this parameter, as the list of email addresses.
      • Change the parameter: -from to your own email address.
      • Change the parameter: -server localhost to your own mail server
      • Note the use of -recipientlimit 1. This instructs NetMailBot to limit each email message sent, to one recipient.
    5. Execute the batch file by double-clicking it in "My Computer".