How to Send Two Attachments
Previous Topic  Next Topic 



This example demonstrates how to send an email with two attachments.


NOTE: You should change the email addresses in the downloadable batch file to your own email address(es) before running a test. Using your own email addresses is the easiest test case.


Prepared Example Files



The archive contains three files:



Batch File Contents


This is the content of the batch file:


netmailbot.exe -to -from -logfile "c:\tmp\log.txt" -server localhost -attachment "attach1.txt" "attach2.txt"




  1. Unzip the file. This will produce a directory called "TwoAttachments". Open this directory.
  2. Open Notepad and edit the batch file "TwoAttachments.bat". Note these important parameters used in the batch file:



NOTE: You must use quotation marks around the filenames specified in the -attachment parameter, as shown above, and the list is separated by spaces.


  1. Invoke the batch file by double-clicking the icon or straight from the command line.
  2. Check your email account Inbox for an email containing two attachments named "attach1.txt" and "attach2.txt".