Welcome Guest, Not a member yet? Register   Sign In
you can not send email through gmail smtp
#1

[eluser]diez[/eluser]
Just to inform anyone that has run into this problem or might run into this problem.

you can not send email through CI using gmail smtp server because it requires a secure connection.

However, there are ways around this by creating your own email library by extending a 3rd party email script. I will shortly submit a ci library class that use swift mailer. With swift mailer you can perform a secure connection to gmail smtp server.

Hope this helps anyone.
#2

[eluser]Crimp[/eluser]
You can use PHPMailer as a plug-in. I submitted a CI feature request for this some time ago, but it never got a comment. With PHPMailer, it's as simple as this to get connected:

Code:
$this->load->plugin('phpmailer');
            
$mail = new phpmailer();
$mail->IsSMTP();
$mail->SMTPAuth    = true;
$mail->SMTPSecure    = "ssl";
$mail->Host            = "smtp.gmail.com";
$mail->Port            = 465;
$mail->Username    = "[email]";
$mail->Password    = "[password]";
#3

[eluser]yacman[/eluser]
You can send via ssl, just use these settings:

Code:
$config['smtp_host']='ssl://smtp.googlemail.com'
$config['smtp_port']=465

This works for other secure smtp implementations too. Just slap 'ssl://' in front of the smtp host and you are magically working.




Theme © iAndrew 2016 - Forum software by © MyBB