简体   繁体   English

使用PHP创建SMTP帐户并接收邮件

[英]Creating SMTP Account and Receiving mail using PHP

I was wondering if during the time of my User Registration for my site, I can create an SMTP account something like : username@mydomain.com for that user using PHP? 我想知道在我的网站用户注册期间,是否可以使用PHP为该用户创建一个SMTP帐户,例如: username@mydomain.com

And also, some method of receiving/fetching the mails using PHP into my DB so that it can act as a mail client as well? 还有,使用PHP将邮件接收/提取到我的数据库中的某种方法,以便它也可以充当邮件客户端吗?

The closest answer I could find was using something like "procmail" or some service like : " http://www.cloudmailin.com/ " 我能找到的最接近答案是使用“ procmail”之类的东西或诸如“ http://www.cloudmailin.com/ ”之类的服务

However, is there no other method to do it? 但是,没有其他方法可以这样做吗?

For example, when we send a mail at someuser@facebook.com it goes directly to his message box. 例如,当我们通过someuser@facebook.com发送邮件时,它将直接转到他的消息框中。 How is this happening? 这是怎么回事?

另一种方法是将邮件服务器设置为接受邮件到*@yourdomain.com,并将所有传入消息转发到PHP脚本,该脚本将解析每个传入消息,更新数据库等。有关如何设置的更多信息请参阅: http : //harrybailey.com/2009/02/send-or-pipe-an-email-to-a-php-script/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM