2011-09-29 82 views
0

如何从电子邮件服务器检索电子邮件并将它们放入MySQL数据库?检索电子邮件并将其存储在MySQL中

理想化坚持与PHP。但如果需要的话可以加入其他语言。

+0

问题我亲爱的不清楚。请详细说明它更亲爱的/ – rahularyansharma

+0

基本上,我将如何从我的电子邮件服务器检索电子邮件到MySQL数据库? – Adam

回答

1

是的,有。

如果您使用cPanel的托管解决方案。如果您使用的是Postfix的解决方案来看看

https://serverfault.com/questions/258469/how-to-configure-postfix-to-pipe-all-incoming-email-to-a-script

你应该看看

http://www.webmasters-central.com/article-blog/tutorials/email-pipe-tutorial-setting-up-email-piping/

http://devtrench.com/posts/simple-email-logger-using-cpanels-pipe-forwarder

(用于PHP脚本)

http://evolt.org/incoming_mail_and_php?from=50

你应该寻找“管道电子邮件到PHP”或“管道电子邮件到Python”或你在谷歌上使用的语言。

无论如何,使用PHP或Python你可以实现这一点,让你的传入电子邮件到数据库。

0

这里是全班它可以帮助你做到这一点我已经用它和它的工作

http://www.phpclasses.org/package/3324-PHP-Retrieve-e-mail-messages-into-a-MySQL-database.html

进一步可以从 PHP email to mysql database issue when not deleting emails from server

看到他使用的代码获得帮助,其由imap_open完成也看到这个

http://php.net/manual/en/function.imap-open.php

+1

请注意,[只有链接的答案](http://meta.stackoverflow.com/tags/link-only-answers/info)不鼓励,所以答案应该是搜索解决方案的终点(vs.而另一个引用的中途停留时间往往会随着时间推移而过时)。请考虑在此添加独立的摘要,并将链接保留为参考。 – kleopatra

+0

谢谢亲爱的kleopatra下次我会照顾好这个建议 –

相关问题