我正在设置一个“类似代理”的电子邮件,通知电子邮件会发送给他订阅的用户,但他可以回复notification@site.com
应该包含他的回复的电子邮件。在服务器端,我希望能够阅读他的电子邮件并将他的回复添加到数据库中 - 电子邮件存储在notification
用户收件箱中,这很棒,现在可以使用 PHP 阅读它。
所以,我一直在寻找解决方案,很多解决方案都是 IMAP,所以我想我会试一试,但我似乎无法确定我的服务器连接以打开收件箱。我已经调整到不同的端口,但它们都无法连接。
imap_open("{localhost/imap:143}", "notification", "password");
我收到这样的错误:
Warning: imap_open(): Couldn't open stream {localhost/imap:143} in /var/www/site.com/www/mail.php on line 8
bool(false)
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to localhost,143: Connection refused (errflg=2) in Unknown on line 0
我不明白,显然这是我第一次尝试这个,但是我显然在连接上做错了什么?
编辑:我courier-imap
现在开始我得到这个:
Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=1) in Unknown on line 0
Notice: Unknown: [ALERT] Fatal error: No such file or directory: No such file or directory in Unknown on line 0