2014-05-12 16:44
浏览 28


I need to process information received by mail with my DB automatically.

lets say the server received an email for 'X' , and 'X' is indexed in my DB, i want to perform an action on this row in the database.

I'm running an Ubuntu server and php 5.5.

what is the best way of achieving it?

** EDIT **

I know its not PHP alone, I have no problem modifying server variables / doing some modifications.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douxie2007
    douxie2007 2014-06-10 12:28

    2 options:

    • if GMail accepts your mail, you can't capture it there. If you have a paid account there, you can set up additional routes for specific emailaddresses to also be delivered to a server under your control (in which case Marc B.'s answer should be followed: configure that other mail server to just pipe the mail to whatever script you want).
    • if you can't do that, or don't want to, just look at the imap extension of PHP, if plays perfectly nice with Google's IMAP interface in my experience.
    点赞 评论