GMail authentication problem in PHPMailer

A client website recently has moved to a new server and the Drupal PHPMailer module failed to authenticate the Gmail account. You could try the following steps to allow other application to access your account.

1. Go to and click Continue.

2. After that, try authenticate your Gmail account in your application like an email client or other devices such as your mobile phone. In my case, i try to send a test message in the Drupal PHPMailer configuration page.

Update @ 2013-08-29: It fails again, got the following error in the debug message.

  • SMTP -> ERROR: Failed to connect to server: Connection timed out (110)

I solve the problem by setting the application-specific passwords in the GMail account and also change the SMTP authentication to port 465 with SSL.

Done =)



2 thoughts on “GMail authentication problem in PHPMailer”

  1. Thank you soooooooooooo much!!!!!!! I had tried all sort of things before for sooo many hours but this problem wasn’t going away. Doing that 2-step verification thing and using the app password in place of my gmail general password finally did the trick. Really thankful to you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.