SMTP connect() failed.PHPmailer SMTP connect() failed.PHPmailer codeigniter codeigniter

SMTP connect() failed.PHPmailer


You need full email address in your connection configurations:

$mail->Username = 'username@gmail.com';

And if use TLS security protocol you need use:

$mail->SMTPSecure = "tls";$mail-> Port = 587;...

Or to SSL (that is deprecated status):

$mail->SMTPSecure = "ssl";$mail-> Port = 465;...


Check your php.ini file, on it, if you have this:

;extension=php_openssl.dll

change it to

extension=php_openssl.dll