I need a console app that can monitor the inbox of a Gmail mailbox, and then alert a specific email address if a message is there for longer than X minutes.
I need a console app that can monitor the inbox of a Gmail mailbox, and then alert a specific email address if a message is there for longer than X minutes. This application will be run via the windows scheduler, and as such DOES NOT need UI.
1. Application will check the inbox folder of the target Gmail account.
2. It will look at all messages in the inbox and compare the date/time the email was sent with the current system date/time.
3. If the difference between them is longer than X seconds, then the program should generate an email to the configured notification address. Email should have a subject of "Alert: Modification Detected". The body should contain the interval in number of minutes that the longest message has been in the inbox. It's not necessary to send an analysis of all messages--only the longest interval if one or more exists.
4. After the program completes one cycle, it should exit without any user intervention.
5. Errors should be logged to an [url removed, login to view] file in the same directory as the executable.
6. Program should run with .NET Framework [url removed, login to view] or 4.0
7. The following parameters should will be specified in an .INI file to be located in the same directory as the executable:
- TimeInterval (the difference between the time the message was sent and the system time in seconds or minutes)
I can provide test accounts or you can just create your own test gmail account and run against that.