Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I build a notification email/reply system like Facebook?

When users receive a notification email about a new private message on Facebook, they can reply to the email and have their response automatically added to the conversation on the site.

How can I build a cross platform system like that? I'm building a group chat system.

like image 707
Nguyen Trong Nhan Avatar asked Dec 28 '22 23:12

Nguyen Trong Nhan


1 Answers

This is obviously way over-simplified, but here we go:

The way Facebook's emails work is by using a string that's unique to the receiver in the reply-to address:

<m+50edqb50000003jtdj389k6xib6hofj6t41q1c45sdt92qc@reply.facebook.com>

So when Facebook receive an email into reply.facebook.com, they (presumably) parse the string after the plus sign, decide which user/conversation it's relevant to, and add the text of the email into that conversation.

like image 96
alexmuller Avatar answered Jan 05 '23 19:01

alexmuller