Drag and Drop an Attachment to Send
Previous Topic  Next Topic 



This example demonstrates how to create a batch file on your desktop that you can drop files onto, which are sent to a pre-specified email address. 

Note the "%1" below (in the batch file listing) instead of naming the attachment. This tells the batch file to attach the file being dropped on it.

Prepared Example Files

A template for this example is provided in the ZIP archive available here. Download this file to a suitable place on your hard drive.


The archive contains one file:



Batch File Contents


This is the content of the batch file:


NetMailBot -to to@mailserver.com -from from@mailserver.com -subject "%1" -server mail.mailserver.com -attachment "%1"




  1. Unzip the DragDropAttach.zip file. This will produce a directory called "DragDropAttach". Open this directory.
  2. Open Notepad and edit the batch file "Drop Email.bat". Change the values of the parameters -to, -from, and -server to appropriate settings.
  3. Copy the Drop Email.bat file to your desktop.
  4. Drag and drop a file onto the Drop Email.bat file as shown below:



  1. NetMailbot should start up and, upon finishing, the email addresses specified with the -to parameter should each receive an email message with the dropped attachment included!