0
我想从我的服务器发送电子邮件与Gmail的smtp。我使用下面的代码:使用Gmail的smtp服务
$mesaj=$this->load->view('main/mail.php',$token,true);
$config['protocol'] = 'smtp';
$config['wordwrap'] = FALSE;
$config['charset'] = 'utf-8';
$config['mailtype'] = 'html';
$config['smtp_host'] = 'smtp.gmail.com';
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = 'password';
$config['smtp_port'] = '465';
$this->load->library('email');
$this->email->initialize($config);
$this->email->from('[email protected]');
$this->email->to($email);
$this->email->subject('Subject');
$this->email->message($mesaj);
$this->email->send();
echo $this->email->print_debugger();
但我得到以下错误:
SMTP ERROR OCCURED. AUTH LOGIN COMMAND COULD NOT SEND
我有我的服务器上没有SSL证书。这可能是问题吗?我该如何解决这个问题?