【发布时间】:2014-10-14 00:43:42
【问题描述】:
当我通过我的本地设置服务器 (http://bftanker.l) 发送邮件时,电子邮件可以正常工作并到达正确的邮件客户端 (xxx@bftanker.com)。当我将我的网站上传到他们的托管平台时,我总是会收到相同的“客户端超时”错误。
The following SMTP error was encountered: 110 Connection timed out
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM: ...
有什么建议吗?这是托管平台上某处的复选框还是我有代码错误?
$this->load->library('email');
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.bftanker.com';
$config['smtp_port'] = '2525';
$config['smtp_user'] = 'xxxx@bftanker.com';
$config['smtp_pass'] = 'xxxxxx';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
$config['mailtype'] = 'html'; // or html
$config['validation'] = TRUE;
$this->email->initialize($config);
$this->email->from('xxx@gmail.com', 'Warre Buysse');
$this->email->to('xxxxx@bftanker.com');
$this->email->subject('Email Test Local');
$this->email->message('Testing the email.');
$this->email->send();
echo $this->email->print_debugger();
我正在使用 Codeigniter 框架。 随意测试表单并在http://www.bftanker.com查看 print_debugger
【问题讨论】:
-
确保您的主机允许来自 PHP 的电子邮件。
-
这肯定是主机特定问题。
-
是否有可能以某种方式检查?并对其进行编辑?
-
您必须联系您的提供商以获取具体说明。