电子邮件触发PHP脚本

电子邮件触发PHP脚本

本文介绍了电子邮件触发PHP脚本...可能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要根据电子邮件正文内的触发词从我控制的电子邮件帐户设置自动回复。而且,它需要根据发送到此电子邮件帐户(属于我的网站)的触发词从数据库表中添加/删除行,并且需要在某些情况下在论坛中创建一个主题,如果发送到不同的电子邮件地址(但在同一台服务器上)。我知道PHP能够做到这一点,但不太确定当电子邮件发送到我控制的特定电子邮件地址帐户时如何触发PHP脚本执行。或者如果有另一种解决方案来实现这一点,请让我知道。

I'm in need of setting up an auto-response from an email account that I control, based on trigger words within the body of the email. But also, it needs to add/delete rows from a database table based on trigger words sent to this email account (that belongs to my site) and it needs to create a topic, in some cases, within a forum, if sent to a different email address (but on the same server). I know PHP to be able to do this, but not really sure how to trigger a PHP script to be executed when an email gets sent to a specific email address account that I control. Or if there is another solution to accomplish this, please let me know.

这基本上是一个关于如何完成这样的事情的询问,基于发送到我的服务器上的具体电子邮件地址,如:加入,离开,设置邮件,设置摘要等。

This is basically an inquiry on how to accomplish something like this, based on an email sent to a specific email address on my server with words like: "Join", "Leave", "Set Mail", "Set Digest", etc. etc.

留下另一个电子邮件地址帐户,需要在数据库中发送这些订阅者,同样精确的电子邮件(大量发送)。这是一个CDB-L ListServ。我想这样的老学校,但是我们想将这种能力转移到我们的服务器上,因为这些旧的学校方法今天仍然有效,而且非常活跃。

There will be another email address account set aside that will need to send those subscribers in the database, the same exact email (Mass Send). This is for a CDB-L ListServ. Kind of old school I suppose, but we want to transfer this ability to our server, since these old school methods still work today and is very much active.

对安全性好奇问题,我需要什么类型的服务器软件,只是一个基本的方法,如何设置这样的东西。

Curious on security issues, what type of server software I'll need and just a basic approach on how to set something like this up.

推荐答案

如果您运行自己的邮件服务器(在linux上,这只是/ etc / alias文件或等效的目标是php脚本而不是电子邮件地址),您可以直接将电子邮件地址别名到php脚本,例如

You can alias your email address directly to a php script if you run your own mail server (on linux this would just be in the /etc/alias file or equivalent where the target was your php script instead of an email address) eg http://www.topwebhosts.org/bbs/board.php?bo_table=server_mgmt&wr_id=73

如果没有,那么你唯一真正的选择是设置一个php进程,每x分钟检查邮件的邮件地址

If not, then your only real choice is to set up a php process that checks an email address for mail every x minutes.

我多年来一直使用这两种方法取得圆满成功

I have used both these methods over the years to great success

这篇关于电子邮件触发PHP脚本...可能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 02:00