Php 使用codeigniter发送电子邮件时主题长度问题
当邮件主题太长时,会出现以下错误Php 使用codeigniter发送电子邮件时主题长度问题,php,codeigniter,Php,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设置为 $co
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个字符的电子邮件主题引起: 更改电子邮件配置可能会有帮助。有两种方法:
$email=new CI\u email(数组('newline'=>“\r\n”)代码>
$this->email->newline=“\r\n”
和$this->email->crlf=“\n”代码>
你用谷歌搜索错误信息了吗?”您的服务器可能未配置为使用此方法发送邮件。'不知道CodeIgniter,但。。。我们说的是什么尺寸?200字符?2,000? 20000000?我想您的crlf也应该是\r\n。