[英]subject length issue while sending email using codeigniter
當電子郵件主題太長時,出現以下錯誤
The following SMTP error was encountered:
451 See
http://pobox.com/~djb/docs/smtplf.html. Unable to send email using
PHP SMTP. Your server might not be configured to send mail using
this method.
當縮短主題長度時,它可以正常工作。我的smtp config
設置是
$config['protocol'] = 'smtp'; $config['smtp_host'] = 'host';
$config['smtp_port'] = '**'; $config['smtp_user'] = $email_id;
$config['smtp_pass'] = $password; $config['charset'] = 'utf-8';
$config['newline'] = "\r\n"; $config['crlf'] = "\n";
$config['wordwrap'] = TRUE; $config['wrapchars'] = 10;
$config['mailtype'] = "html";
提前致謝。
顯然,這是一個已知問題,是由電子郵件主題引起的,該主題超過75個字符: http : //codeigniter.com/forums/viewthread/154493/P15/#925385
更改電子郵件配置可能會有所幫助。 有兩種解決方法:
$email = new CI_Email(array('newline' => "\\r\\n"));
$this->email->newline = "\\r\\n";
和$this->email->crlf = "\\n";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.