|
代码如下
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.qq.com';
$config['smtp_user'] = '******';
$config['smtp_pass'] = '******';
$config['charset'] = 'utf8';
$this->email->initialize($config);
$this->email->from('sun988718@qq.com', 'dfsdf');
$this->email->to('912519717@qq.com');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
错误提示:
220 esmtp4.qq.com Esmtp QQ Mail Server
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:
The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method. |
|