doujuchuan9915 2013-08-15 07:52
浏览 87
已采纳

使用PHP接收和处理传入的电子邮件[关闭]

I want to setup an environment, where users send an email to mobile numbers with fix domain name, for ex. 12345678@somedomain.com and I will read all the incoming emails coming to my somedomain.com.

Now further, I will already have user information with same mobile number, and will forward received email to that user on his specific email address.

Now, what I want to know is:

1] Does anyone know or already have implemented in PHP, how to check or read / process incoming emails as I get them, may be with SMTP or POP3 or IMAC protocol and further forward same email to specific users.

2] What should be the standard server environment requirement for this. I mean Windows server with some pre-installed services or ports opened, or Linux server could be a better environment for this functionality.

I tried to search over many protocols like Procemail, Sendemail open source resources, however not getting proper help to understand thoroughly.

I see some similar questions, though asking with my specific details and functionality to develop in future. Hope it will be okay.

Earliest response will be appreciated.

  • 写回答

1条回答 默认 最新

  • dongmingxiang0312 2013-08-15 08:03
    关注

    1) You can setup 'catch-all' email for incoming messages so all email will land there. For accesing emails you can use POP3 or IMAP which are supported by PHP: some example: link. SMTP is for sending emails.

    To read emails you would have to setup CRON job that periodically checks your master account for new messages - just like any other email client.

    2) If you must setup own mail server use Linux with Postfix/Dovecot great tutorial for Debian but you can use PHP to just access mailbox and process new emails.

    To send emails you can use some library (I've recently used Zend Mail component and it works great ).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?