Fire event when receiving email

I am trying to write something that puts the contents of a message in a queue so that I can work on it later. I often came across IMAP IDLE with varying degrees of success.

I was interested to find out if anyone knows about the method for the mail server to receive the email and then perform an action such as publishing the contents of the email to the URL endpoint.

Any ideas? Thanks!

+5
source share
2 answers

Try fetchmail and procmail . You periodically poll the mail server (every minute if necessary) and use fetchmail to download from the IMAP server. Configure the procmail rule to run an email notification application that matches your selection criteria.

Any of the scripting languages ​​(perl, python, tcl / tk, etc.) has good, mature and easy-to-use email handler libraries (you can actually get these things for most lanaguages), so this should be pretty simple write a handler in one of them.

+4
source

SMTP ( ) , . IMAP ( ), .

0

All Articles