【发布时间】:2017-10-22 07:14:27
【问题描述】:
PHP:
$config = Array(
'useragent' => 'CodeIgniter',
'mailpath' => '/usr/bin/sendmail',
'protocol' => 'smtp',
'smtp_host' => 'mail.kakaproperty.com',
'smtp_port' => 587,
'smtp_user' => 'info@kakaproperty.com',
'smtp_pass' => '******',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->set_mailtype("html");
$this->email->from('info@kakaproperty.com'); // change it to yours
$this->email->to($data['email']);// change it to yours
$this->email->subject('Welcome to kaka property');
$this->email->message("New message by kaka property");
if($this->email->send())
{
echo 1;
}
else
{
$this->email->print_debugger();
}
任何人都可以请帮助我为什么它显示错误无法连接 ssl://smtp.googlemail.com 我使用 kakaproperty.com 作为主机为什么会发生这种情况。我从配置文件夹中删除了 email.php。
【问题讨论】:
-
划掉我之前的评论,不要使用
465作为端口 -
@AntonisTsimourtos 我试过 465 但它不起作用。
-
您确定凭据正确吗?我不知道
stmp_user是否正确.. -
@AntonisTsimourtos 先生,所有信息都是正确的。
标签: php codeigniter email ssl