ImapMailbox.php的错误和问题

时间:2015-09-10 20:02:25

标签: php codeigniter imap

我在CodeIgniter中编写了一个PHP脚本,它使用ImapMailbox.php库(https://github.com/barbushin/php-imap)将来自远程IMAP / POP服务器的电子邮件同步到我们的Web应用程序,我遇到了很多问题。当我从Gmail帐户同步时,一切正常,但当我尝试从GoDaddy电子邮件帐户进行同步时,我们会收到以下错误。

Undefined property: stdClass::$from /var/www/html/application/libraries/ImapMailbox.php 435
Trying to get property of non-object /var/www/html/application/libraries/ImapMailbox.php 435
Unknown: Warning: message has unknown MIME version (errflg=3) Unknown 0
Unknown: Ignoring nested encoding of multipart contents (errflg=3) Unknown 0
Unknown: Warning: MIME header encountered in non-MIME message (errflg=3) Unknown 0
Unknown: Missing parameter (errflg=3) Unknown 0
Unknown: Must use comma to separate addresses: Delivery System (errflg=3) Unknown 0
Unknown: Missing parameter value: CONTENT-TRANSFER-ENCODING (errflg=3) Unknown 0
Unknown: Unexpected characters at end of parameters: : 8bit (errflg=3) Unknown 0
Unknown: Invalid quoted-printable sequence: = Hump Day Special: Save on our July 14th Spring/Klein Pocketbook mail=

ing




(errflg=3) Unknown 0
imap_fetchheader(): Bad message number /var/www/html/application/libraries/ImapMailbox.php 428
iconv(): Wrong charset, conversion from `X-UNKNOWN' to `utf-8//IGNORE' is not allowed /var/www/html/application/libraries/ImapMailbox.php 641

有没有人对修复上述问题有任何建议?

1 个答案:

答案 0 :(得分:0)

您的代码中的问题是您在实际使用电子邮件之前致电imap_close()。尝试保持打开您的IMAP连接以检查此内容。

Unknown: Warning: message has unknown MIME version (errflg=3) Unknown 0

这很可能表示连接尚未就绪且未收到任何数据,因此验证失败,或者POP3 / IMAP服务器工作错误。