当发生错误时,imap_last_error()在PHP中给出一个字符串返回.
我想捕获这些,以便我可以将它们传递给我的应用程序并对它们采取行动.问题是,它没有给出错误代码,另外我找不到可能出现的所有可能的错误.
有谁知道我可以在哪里发现这些?目前我知道
'Unknown Error',
'Too many login failures',
'Login aborted'
Run Code Online (Sandbox Code Playgroud)
但必须有更多.
先谢谢你们.
下载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);