Google Gmail SMTP settings not allowing me to send emails with PHPMailer Google Gmail SMTP settings not allowing me to send emails with PHPMailer codeigniter codeigniter

Google Gmail SMTP settings not allowing me to send emails with PHPMailer


I would recommend to actually read the error message:

... 534-5.7.9 Please log in with your web browser and then try again. Learn more at 534 5.7.9 https://support.google.com/mail/answer/78754 b16sm3352387qga.48 - gsmtp

When reading this site you will find something about supporting client which provide only less secure methods of authorization. Your client is one of these so follow the link to learn how to enable support for these application in gmail.


You can send email without own smtp server:1) get recipient mx hostname from dns2) send email to port 25


Not saying this is necessarily what happened to the topic opener but I had exactly this same error today. And the reason I got it was because I created a new e-mail address and you first need to log in to Gmail via the browser once before you can use smtp.

After logging in to the Gmail web client via the browser and going over the initial flow I was able to send via the smtp endpoint.