2011年4月15日 星期五

[Codeigniter] Email Class send Microsoft Exchange server 發生錯誤解決方法.

使用 CI 1.7.3 版本 Email Class 透過SMTP (Exchange Server) 送信.  發生錯誤.
如下:
[send_mail_helper]
error 220 twowa.XXX.com Microsoft ESMTP MAIL Service ready at Thu, 14 Apr 2011 18:58:40 +0800
hello:
The following SMTP error was encountered:
Failed to send AUTH LOGIN command. Error:
from: 
The following SMTP error was encountered:
to: 
The following SMTP error was encountered:
data: 
The following SMTP error was encountered:
451 4.7.0 Timeout waiting for client input

問題答案:
找出 Email Class 將

var $newline = "\n";
var $crlf = "\n";

改成 即可.

var $newline = "\r\n";
var $crlf = "\r\n";

【下列文章您可能也有興趣】

沒有留言: