How to create an email / reply email system like Facebook?

When users receive an email notification of a new private message on Facebook, they can respond to email and automatically respond to a response to the site.

How can I build such a cross-platform system? I am creating a group chat system.

+4
source share
2 answers

This is clearly simplistic, but here we go:

How Facebook Email Works Using a String Unique to the Recipient at reply-to :

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

So, when Facebook receives an email at reply.facebook.com , they (presumably) analyze the line after the plus sign, decide which user / conversation they belong to, and add the message body to this conversation.

+6
source

One option:

Send each notification email with a unique response to the address, and then receive replies using the configured SMTP server, which will associate the responses with the original message object in your database.

Since you are using django (according to your tags), I would recommend looking at the Lamson python SMTP server. It can be programmed for the correct attribute of each message. The use of Lamson with Django is documented .

+4
source

Source: https://habr.com/ru/post/1344920/


All Articles