来自:550 访问被拒绝 - HELO 名称无效(请参阅 RFC2821 4.1.1.1) 遇到以下 SMTP 错误:550 访问被拒绝 - HELO 名称无效(请参阅 RFC2821 4.1.1.1) 辞职: 遇到以下 SMTP 错误: 无法使用 PHP SMTP 发送电子邮件。您的服务器可能未配置为使用此方法发送邮件。
下面是在 Codeigniter PHP 中发送电子邮件的代码
$config = array();
$config['mailpath'] = '/usr/sbin/sendmail';
$config['wordwrap'] = 'TRUE';
$config['mailtype'] = 'html';
$config['priority'] = '1';
$config['crlf'] = "\r\n";
$config['auth'] = TRUE;
$config['helo'] = NULL;
$config['protocol'] = 'smtp';
$config['smtp_host'] = SMTP_SERVER_ADDRESS;
$config['smtp_user'] = SMTP_USERNAME; //$smtp_user;
$config['smtp_pass'] = SMTP_PASSWORD; //$smtp_pass;
$config['smtp_port'] = SMTP_PORT_NUMBER; //$smtp_port;
$config['smtp_auth'] = 'TRUE';
$this->load->library('email');
$this->email->initialize($config);
$subject = $email_data["mail_title"];
$message = $email_data["mail_body"];
如何修复使用 google mail 发送电子邮件时的此错误
好吧,这是一个迟到的回复,但对其他人可能有用。
使用Webmail测试用户名+密码,检查是否正确。
我也遇到同样的错误,而且我的密码错误。