如何从PHP获取电子邮件及其附件 [英] How to get email and their attachments from PHP

查看:157
本文介绍了如何从PHP获取电子邮件及其附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为朋友的婚礼写一个照片库webapp,他们想要一个照片库供客人提交他们当天拍摄的数码照片。

I'm writing a photo gallery webapp for a friend's wedding and they want a photo gallery for guests to submit the digital photos they take on the day.

在评估所有选项后,我决定最简单的方法是让用户使用一个熟悉的界面(他们的电子邮件),并让他们发送图片作为附件。

After evaluating all the options, I've decided the easiest thing for users would be to let them use a familiar interface (their email) and just have them send in the pictures as attachments.

我创建了一个邮箱,但现在我需要连接并检索这些附件以进行自动处理以添加到图库系统。但是怎么样你有没有看过这样做的教程或预制课程?

I've created an mailbox but now I need to connect and retrieve these attachments for automated processing for adding to the gallery system. But how? Are there any tutorials or prefab classes you've seen for doing this?

推荐答案

你使用什么MTA?如果您使用postfix + maildrop,您可以创建一个过滤规则,通过PHP脚本来管理某些消息,然后处理传入的邮件。 (google为maildrop和 xfilter )。

What MTA are you using? If you use postfix + maildrop you can create a filtering rule that pipes certain messages through a PHP script that then handles the incoming mails. (google for maildrop and xfilter).

这篇关于如何从PHP获取电子邮件及其附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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