PHP使用传入电子邮件执行操作 [英] PHP Perform Action with Incoming Email

查看:108
本文介绍了PHP使用传入电子邮件执行操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个照片分享网站(只是测试PHP的东西),我希望用户能够使用电子邮件提交照片。

I'm building a photo sharing website (just testing PHP stuff) and I want users to be able to submit photographs using email.

例如,网站当用户发送带有图像附件的电子邮件和正文中的文本时,需要运行脚本。该图像将被上传到服务器,并且将创建一个新的照片帖子,电子邮件正文中的文本是描述。

For instance, the website needs to run a script when the users sends an email with an image attachment and text in the body. The image would be uploaded to the server, and a new "photo post" would be created with the text in the email body being the description.

我的问题是,电子邮件接收时,请告诉我的服务器自动运行脚本?

My question is, how do I tell my server to run a script automatically when email is RECEIVED?

任何/所有帮助都非常感谢。如果你想要更多的信息,只要评论!

Any/all help is greatly appreciated. If you would like more info, just comment!

谢谢! -Giles

Thanks! -Giles

推荐答案

如果您使用cpanel,您可以将电子邮件管道到一个脚本,然后相应地处理电子邮件。您可以在电子邮件转发器下找到该选项。

If you use cpanel you can pipe the email to a script which then processes the email accordingly. You can find that option under the email forwarders.

这篇关于PHP使用传入电子邮件执行操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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