Forward an Email
Previous Topic  Next Topic 

Purpose

 

This example demonstrates how to retrieve an email from a POP3 server and forward it to another email address. 

 

Additional Prerequisites

 

The user account you specify should have at least one email message on the POP server in order for this example to work. An email can be sent to the account you specify with a different example, click here.

 

Prepared Example Files

 

 

The archive contains one file:

 

 

Batch File Contents

 

This is the content of the batch file:

 

NetMailBot.exe -receive -popforward -popreceive 1 -popserver localhost -popuser email@domain.com -poppassword secret -to email@domain.com -from email@domain.com -server localhost

 

pause

 

Steps

 

  1. Unzip the Forward.zip file. This will produce a directory called "Forward". Open this directory.
  2. Open Notepad and edit the batch file "Forward.bat". Change the values of the following parameters:

 

NOTE: The parameter -receive is required whenever using the POP3 parameters; this parameter puts NetMailBot into what might be called "POP3 mode" as opposed to "SMTP mode" which is for sending mails.

 

NOTE: Recall that your SMTP server may require authentication; see this example for more information.

 

  1. Invoke the batch file by double-clicking the icon or straight from the command line.
  2. An email message from your POP3 mail server should be downloaded and the message parts should be saved to your hard drive in a folder named "pop" under your System Temporary Directory.
  3. The downloaded email message should have been sent (forwarded) to the email address specified with the -to parameter.