Purpose
This example demonstrates how to check an email account on a POP3 server every 5 seconds for new messages, retrieve any messages, then delete them from the POP3 server.
** WARNING ** This example will delete all emails for the specified user account on the specified POP3 email server. You should use a test account for this example to ensure that critical data is not accidentally deleted.
Why Use this Feature?
This feature is useful for monitoring a POP3 email account for new email messages that you wish to retrieve on a regular basis. One might use this feature to retrieve a message that contains an attachment.
For example, if a company has a number of satelite offices that send daily reports to a single email address for collation, one would use this feature to monitor that email account and automatically save the attachment.
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 -receive -popreceive -popwatch -popwait 5000 -popdelete -popserver mail.domain.com -popuser email@domain.com -poppassword test
pause
Steps
NOTE: The parameter -receive is required whenever using the POP3 parameters.