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

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

问题描述

我正在为朋友的婚礼编写一个照片库网络应用程序,他们想要一个照片库供客人提交他们当天拍摄的数码照片.

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 for 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天全站免登陆