通过电子邮件回复(如 Facebook)
我正在开发一个 PHP 网站,可以在其中发布帖子/评论。
此时,我已经使用 PHP mail() 在某人的墙上发布了某些内容时向某人发送电子邮件。
现在我的问题是: 我想知道 Facebook 是如何能够直接回复电子邮件并使其在网站上显示为评论,而无需登录或任何其他操作 - 只是一个普通的电子邮件回复。
- 这可以用 PHP 来完成吗?
- 如何生成带有 id 等的动态回复标头,然后自动检索它并用它发表评论......?
我已经在谷歌上搜索过,但找不到太多关于此的信息...
任何帮助或起点将不胜感激。
谢谢。
I am developing a PHP website where it is possible to make wall posts / comments.
At this point, I already use PHP mail() to send a email to a person when something is posted on their wall.
Here is my question now:
I would like to know how is it that Facebook does to be able to reply directly to email and make it appears as comment on the site, without need to login or anything - just a normal e-mail reply.
- Is this possible to acomplish with PHP?
- How is it possible to generate a dynamic reply-to header with the id and so, and then retrieve it automatically and post a comment with it...?
I have searched around Google but could not find to much about this...
Any help or starting point would be appreciated.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您检查发送电子邮件的地址,会发现它是一堆数字和字母,可能代表帖子 ID 以及加密为某种形式的用户 ID。然后,他们必须检查 SMTP 服务器上的所有电子邮件,并根据收到的电子邮件添加回复。
无论如何,我认为这就是它的基础。他们会为您执行类似的操作,通过电子邮件上传图片。
If you check the address from which the email was sent, it's a bunch of digits and letters, probably representing the post ID as well as the user ID encrypted to some form. They must then check for all emails on their SMTP server and add the replies according to received emails.
I think that's the basics of it, anyways. They do something similar for you to upload pictures by email.
首先,我不使用Facebook。我什至没有帐户。
因此,我的猜测是后台运行的软件/脚本会不断检查邮箱中的答案并将答案提交到墙上。
他们“记住”在哪里发布答案的方式可能是使用回复地址中的编码数据。
耸耸肩
我希望这有帮助..
First of all, I do not use Facebook. I don't even have an account.
So, my guess would be that a background-running software / script check constantly for answers in their mailbox and submit the answers on the wall.
The way they could "remember" where to post the answer is probably using encoded data in the Reply-To Address.
shrug
I hope this help..