Question

I would like to know what's the best way to manage answers to email notifications.

eg. The user receive an email notification, and instead of having to click on a link to go on the website and answer it he could directly reply to the email.

Was it helpful?

Solution

Use the Message-ID header field to uniquely identify each message. If there is a reply on that message, the client should put that message ID in the In-Reply-To header field in the reply message. See RFC 2822 for further details.

OTHER TIPS

There's no best way. Depending on what you want to do with the responses, you could as well handle them with thunderbirds message filters ;) .

Put a unique identifier into the subject or the body of the notification that you're sending so that you can identify & classify the email correctly when a user replies by email.

If you want to stick with php: pick up the php pop3 client class from: http://www.phpclasses.org/browse/package/2.html or find a client elsewhere and then just parse your message responses and classify / handle them however you want to.

Stick an id and authentication token in the subject line.

Pipe it into a script that can process it with Procmail

As a learning exercise you could read the php code and Documentation to the drupal module http://drupal.org/project/mailhandler mail handler. This accepts emails and looks for script like instructions.

The answer above about checking the message id is also very valid.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top