是否有所有可能的PHP imap_last_error()消息的列表?

时间:2010-07-15 23:40:52

标签: php imap

当发生错误时,

imap_last_error()在PHP中给出一个字符串返回。

我想捕捉这些,所以我可以将它们传递给我的应用程序并对它们采取行动。问题是,它没有给出错误代码,另外我找不到可能出现的所有错误。

有谁知道我可以在哪里发现这些?目前我知道

'Unknown Error',
'Too many login failures',
'Login aborted'

但必须有更多。

先谢谢你们。

1 个答案:

答案 0 :(得分:5)

下载UW c-client并检查文件c-client\imap4r1.c

绝大多数错误消息都是IMAP服务器发送的错误消息的复制品。不过,我找到了一些预先确定的。他们在这里:

mm_log ("Scan not valid on this IMAP server",ERROR);
mm_log ("Unable to negotiate TLS with this server",ERROR);
mm_log ("IMAP Authentication cancelled",ERROR);
mm_log ("Can't do secure authentication with this server",ERROR);
mm_log ("Server disables LOGIN, no recognized SASL authenticator",ERROR);
mm_log ("Can't do /authuser with this server",ERROR);
mm_log ("Too many login failures",ERROR);
mm_log ("Login aborted",ERROR);
mm_log ("[NOTUIDPLUS] Can't do UID EXPUNGE with this server",ERROR);
mm_log ("Excessively complex sequence",ERROR);
mm_log ("Can't access server for append",ERROR);
mm_log ("ACL not available on this IMAP server",ERROR);
mm_log ("Quota not available on this IMAP server",ERROR);