Gau*_*rav 4 php email codeigniter
无法验证密码.错误:534-5.7.14请通过网络浏览器登录,然后重试.534-5.7.14了解更多信息,请访问534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 wv1sm5867206pab.37 - gsmtp
function index() {
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'gauravkwt@gmail.com',
'smtp_pass' => '92135108845129',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('gauravkwt@gmail.com', 'Gaurav kwatra');
$this->email->to('gaurav.kawatra@ymail.com');
$this->email->subject('This is an email test');
$this->email->message('Emial Testing');
//$this->email->initialize($config);
if($this->email->send())
{
echo 'Your email sent...!!!! ';
}
else
{
show_error($this->email->print_debugger());
}
}
//end of code
Run Code Online (Sandbox Code Playgroud)
我使用上面的代码从codeigniter发送邮件....我有一个错误...无法进行身份验证.密码是正确的.
您需要转到您的帐户设置https://www.google.com/settings/security,您需要启用Access for less secure apps
哪个有助于为客户端使用google smtp.
请看看这里太
如果在启用安全性较低的应用程序后仍然无法正常工作 - 您应该登录您的 Google 帐户中的安全区域,查看您的设备是否已被阻止。谷歌阻止了我的服务器,所以我去了https://accounts.google.com/b/0/displayunlockcaptcha,它现在允许我发送。与用户名或密码无关,但谷歌阻止了设备访问。
归档时间: |
|
查看次数: |
13573 次 |
最近记录: |