如果电子邮件的主题太长,则会出现以下错误
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";
提前致谢。
答案 0 :(得分:0)
显然这是一个已知问题,由电子邮件主题引起,超过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";