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.
Prepared Example Files
The archive contains six files:
This is the content of the NMBService.ini file:
ServiceName = NMBService
ProcCount = 1
CheckProcess = 60
CommandLine = C:\Program Files\NetMailBot\netmailbot -receive -popwatch -popwatchwait 5000 -popdelete -popserver localhost -popuser firstname.lastname@example.org -poppassword secret -popreply -from email@example.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.