如何实现功能:通过电子邮件发布到论坛? [英] How to implement a feature: Post to a forum via email?

查看:133
本文介绍了如何实现功能:通过电子邮件发布到论坛?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调查一个新论坛的开发,通过用户反馈发现,通过他们的电子邮件客户端发布到论坛将是一个非常有用的功能。

I'm investigating the development of a new forum and found via user feedback that posting to the forum via their email client would be a very useful feature.

我'我想知道:是可能吗?可以php检查收件箱文件夹,并将每个电子邮件转换为论坛帖子?如果是,如何在LAMP环境中做到这一点?

I'm wondering: is it possible? Can php check for an inbox folder and turn each email into a forum post? And if so, how to do that in a LAMP environment?

推荐答案

将通过收到电子邮件触发的脚本设置到特定地址将是最简单的。这样你就不需要编写一个新的cron脚本。您将创建一个专门用于接收此类电子邮件的专用电子邮件地址。线程可以由被摄体内的某些东西识别出来。我不知道你的用例,这是我可以建议的最好的。您也可以要求邮件中包含一些东西,以将发件人识别为您的认证论坛成员之一。你可能需要向他们或某事揭露秘密令牌。这样,如果任何垃圾邮件进入您可以阻止谁发送的帐户。

Setting up a script triggered by receipt of email to a particular address would be the simplest. That way you don't need to write a new cron script. You would want to create a special email address dedicated to receiving such emails. The thread could be identified by something in the subject that would be required. I'm not sure of your use case so that's the best I can suggest. And you could also require the email to contain something to identify the sender as one of your authenticated forum members. You might need to expose a secret token to them or something. That way if any spammy stuff gets in you can block the account of whoever is sending it.

我相信一些开源论坛软件已经内置,或者有一个添加可以安装来做到这一点。即使你在做自己的工作,也可能希望让这些模块看到它们是如何做到的。

I believe some opensource forum software has this built in, or has an add on you can install to do it. Even though you're doing your own, you might like to get these modules to see how they do it.

这篇关于如何实现功能:通过电子邮件发布到论坛?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆