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 https://accounts.google.com/DisplayUnlockCaptcha and click Continue.
gmail-phpmailer-authen-problem-1
 

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.
gmail-phpmailer-authen-problem-2
 

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 =)

Reference:

Advertisements

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.

    Like

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s