在PHP中处理IMAP电子邮件 [英] Processing IMAP email in PHP

查看:773
本文介绍了在PHP中处理IMAP电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要处理电子邮件收件箱,监控特定主题行的邮件。如果它找到一个匹配,我需要获得正文内容,操纵,并插入到数据库。理想情况下,将邮件标记为已读,并将其移动到另一个IMAP文件夹。



我正在浏览PHP文档imap_open( http://us2.php.net/imap%5Fopen ),并找到一个链接 http://www.linuxscope.net/articles/mailAttachmentsPHP.html#_jmp0_



在我太远之前,我想知道是否有人知道一个现有的PHP类,这是一个很好的包装我正在寻找的基础:



IMAP:




  • 连接

  • 列出文件夹


  • 将邮件移至伺服器资料夹​​

  • 读取邮件/未读状态



谢谢!

解决方案>

我没有用它除了发送邮件,但似乎 Zend_Mail 组件会让你至少大部分的方式在那里。它似乎不支持在服务器上移动邮件,但你可能很简单地扩展它。


I need to process an email inbox, monitor it for messages with a particular subject line. If it finds a match I need to get the body content, manipulate, and insert into a database. Ideally would mark the message as read and move it to another IMAP folder as well.

I'm poking around PHP documentation imap_open (http://us2.php.net/imap%5Fopen) and found a link http://www.linuxscope.net/articles/mailAttachmentsPHP.html#_jmp0_

Before I get too far, I'm wondering if anyone is aware of an existing PHP class that's a good wrapper for the basics I'm looking for:

IMAP:

  • connect
  • list folders
  • list messages
  • read messages - from, to, subject, body
  • move messages to server folders
  • read/unread status

Thank you!

解决方案

I've not used it for anything but sending mail, but it appears that the Zend_Mail component will get you at least most of the way there. It doesn't seem to support moving messages on the server, but you could probably extend it fairly simply.

这篇关于在PHP中处理IMAP电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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