php – Godaddy – SMTP错误(220-我们不授权使用此系统来传输未经请求的,220和/或批量电子邮件.)
作者:互联网
我目前正在使用CodeIgniter 2.2.2,我的控制器中有以下代码:
$config['protocol'] = "smtp";
$config['smtp_host'] = "mail.domain.com";
$config['smtp_port'] = "25";
$config['smtp_user'] = "noreply@somedomain.com";
$config['smtp_pass'] = "password";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";
$config['wordwrap'] = TRUE;
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_mailtype('html');
$this->email->from('noreply@somedomain.com', 'www.somedomain.com');
$this->email->to('someEmail');
$this->email->subject('Email Authentication');
$message = 'Hi';
$this->email->message($message);
$this->email->send();
我尝试使用端口465和ssl://xxxxxxx.prod.iad2.secureserver.net.但我一点都没有运气.我试过联系客服,但不是.除了给我链接到我已经知道的东西之外,他们真的没有帮助我.
为什么我收到消息?它阻止我向其他电子邮件地址发送电子邮件.
有人可以帮忙吗?
解决方法:
我遇到了同样的问题.经过一番研究,我发现对我来说解决方案是:
$config['protocol'] = "mail";
$config['smtp_port'] = 587;
标签:php,smtp,codeigniter,email,godaddy 来源: https://codeday.me/bug/20190717/1489335.html