问题描述
我目前正在使用 CodeIgniter 2.2.2,并且我的控制器中有以下代码:
I am current using CodeIgniter 2.2.2 and I have the following code inside my controller:
$config['protocol'] = "smtp";
$config['smtp_host'] = "mail.domain.com";
$config['smtp_port'] = "25";
$config['smtp_user'] = "[email protected]";
$config['smtp_pass'] = "password";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "
";
$config['wordwrap'] = TRUE;
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_mailtype('html');
$this->email->from('[email protected]', '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.但我一点运气都没有.我试过联系客服,不行.除了给我链接到我已经知道的东西之外,他们真的没有给我太多帮助.为什么我会收到消息?它阻止我向我的其他电子邮件地址发送电子邮件.有人可以帮忙吗?
I tried using port 465, and ssl://xxxxxxx.prod.iad2.secureserver.net. But i am getting no luck at all. I tried contacting the customer service, but nope. They really didn't help me much other than giving me links into things I already knew.Why am I getting the message? It is preventing me to send email to my other email addresses.Can anyone please help here?
推荐答案
我也遇到了同样的问题.经过一番研究,我发现我的解决方案是:
I'm having the same problem. After some research I found that the solution for me was:
$config['protocol'] = "mail";
$config['smtp_port'] = 587;
这篇关于SMTP 错误(220 - 我们不授权使用此系统传输未经请求的 220 和/或批量电子邮件.)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!