Auto-Reply as a Service
Previous Topic  Next Topic 

Purpose

 

This example demonstrates how to use the email auto-reply features of NetMailBot while running NetMailBot as a Windows Service. 

Specifically, a POP3 user account is monitored for new messages. When new messages are found, they are replied to. After the email is replied to, the original email messages in the POP3 user account are deleted.

Additional Prerequisites

 

Prepared Example Files

 

 

The archive contains six files:

 

 

File Contents

 

This is the content of the NMBService.ini file:

 

[Settings]

ServiceName = NMBService

ProcCount = 1

CheckProcess = 60

[Process0]

CommandLine = C:\Program Files\NetMailBot\netmailbot -receive -popwatch -popwatchwait 5000 -popdelete -popserver localhost -popuser email@domain.com -poppassword secret -popreply -from email@domain.com -body "Thanks!" -server localhost

WorkingDir = C:\Program Files\NetMailBot

PauseStart = 0

PauseEnd = 3000

UserInterface = No

Restart = No

 

All of the .bat files invoke NMBService.exe with various parameters to effect the desired outcome.

 

The contents of the .bat files are the same as in the Watch as a Service example.

 

Steps

 

  1. Unzip the ForwardAsAService.zip file. This will produce a directory called "ForwardAsAService". Open this directory.
  2. Open Notepad and edit the file NMBService.ini, changing the following:
  1. Invoke the batch file "NMBService Install.bat" to install the Windows Service helper program.
  2. Ensure that the service and NetMailBot are running. Open Task Manager, select the "Processes" tab, and look for the two processes "netmailbot.exe" and "NMBService.exe".
  3. Check your email account Inbox for email replied to from the user account you have specified.
  4. To uninstall the service, execute the batch file "NMBService UNInstall.bat".