views:

73

answers:

5

A forum-like app I'm working on will send an email notification to the thread starter when a new replied is received. It would be nice if the owner can just reply the email to add a new reply to the thread.

How can I implement the feature, i.e. "reply to this email to comment" like Facebook?

Option A: scan the subject line/body? I don't like it 'cause what if the user modified the subject line by mistake?

Option B: use a unique reply-to e-mail address that links to the thread ID. Is this a common function for mail server? like set up a *@addComment.domain.com ? Or does the app server needs to setup a new email account before sending the email with reply-to?

Any other options?

Thanks!

A: 

an option is to embed an identifier in both the subject and the body of the original email. something small, like bit.ly's 6-8 character code. that way, they're less likely to mess it up, and you have the safety of the email body, which most people leave in anyway.

kolosy
+1  A: 

You could stuff the thread ID or the parent message ID (the message that is being replied to) in the Msgessage-ID: header of the email, or a custom email header, and put the processing after accepting the message.

However, using custom Reply-To: addresses is quite common.

chryss
+4  A: 

Using strings in the subject and body can be easily erased by a user of the system.

Use plus addressing ([email protected]) as the REPLY-TO address in the mail message. With CFIMAP you can retrieve the messages and parse the TO.

Wildcard domain ([email protected]) is also an option, but if your email server supports plus addressing I would go that route.

jarofclay
cool! never heard of "plus addressing". Most mail server supports it?
Henry
If your mail server doesn't support +addresses, you can use a catch-all box in a similar manner. However, this will end up with a bunch more spam, and that server IP/address should not be used for sending, as some ISPs don't treat servers with catchall addresses properly (or at least, they didn't).
Ben Doom
A: 

Using a custom email header is not advised as there is no guarantee that any server along the route would not strip it off (or simply fail to pass it on). A friend who worked at a huge email data center for AT&T said the techs there warned him off that idea.

This may also be true of the Message-ID: -- don't know.

andrewc
A: 

I can help you do this. Check http://www.pushreply.com, a service that allows you to easily implement reply by email. It collects email replies, extracts the relevant content and notifies your application by using a HTTP POST request.

Disclaimer: I'm the creator of this service.

Andrei Savu