I'm trying to set up a print that will send its scans by email. I created a gmail account specifically for the purpose. However no matter which way I configure the SMTP settings, I cannot get it to authenticate with the Gmail smtp server. The printer is an HP LJ M476dw with firmware datecode 20150608.

According to this google apps support document, the proper SMTP are hostname smtp.gmail.com, a choice between port 465 with SSL or port 587 with TLS, and use the full email address (not just username), as the username.

I've put screencap of the printer settings page below. There is a single checkbox for SSL/TLS, and I've tried that with both ports 465 and 587, and even port 25 with no SSL, to no avail. I get a generic authentication error: username or password invalid.

hp lj m476 smtp settings

Just to rule some things out (maybe the printer's smtp client is broken or doesn't support the latest SSL protocols?), I tried to connect to the same Gmail account with my Apple Mail client (v9.0 (3094), running on Mac OS X El Capitan 10.11 (15A284), so completely modern, should definitely support Google's most modern and secure protocols). Now when configuring an email account with Apple Mail, you have an option to configure it as an account with a default well-known provider (Gmail,AOL,Yahoo,Hotmail,etc), and all you have to do is enter the account name, and all configuration is done for you. Doing this, I was able to access the account, both via SMTP and IMAP. But since I'm trying to verify the exact configuration settings necessary, I configured it as a generic IMAP account. Here again, Apple Mail is unable to authenticate, I get generic username/password invalid error. In Apple Mail the methods for authentication are numerous: External (TLS certificate), Kerberos v5 (GSSAPI), NTLM, MD5 Challenge-Response, and Password. See screenshot below. Since the Google help document did not specify an authentication protocol, I tried them all, to no avail. Also I was not able to connect to IMAP configured manually.

Apple Mail SMTP authentication methods

Now the google support document I followed was for Google Apps accounts, not standard Gmail accounts. Perhaps they use different settings? I looked and looked, but I couldn't actually find a Google support page listing the SMTP, POP, and IMAP settings necessary for connecting a generic email user agent to GMail for the standard GMail service. Only dumb walkthroughs that tell you to use your iPhone's default GMail settings. I wonder if the Google Accounts page is out of date, because using a Google Accounts account failed in exactly the same way as a standard gmail.com Gmail account.

This is very strange. What is the difference between my manual IMAP and SMTP configured email account and the default provider configuration? Why can my printer not connect to GMail SMTP via a known good account + password? Why does Google not publish the requisite SMTP email client configuration settings?

I found this question asked previously on Super User, but with seemingly no answer.

1 Answer 1


Poking through the account security settings of the Google Accounts account, in the account security page, under the "Sign in & Security" pane, and the "Connected apps & sites" subpane, there is an option to "allow less secure apps" (see screenshot below), which is off by default. Turning it on solved all my problems. I am now able to connect to GMail over both SMTP and IMAP on my manually configured MUA, and to SMTP from my HP printer.

screenshot of Google Accounts Sign in and Security, connected apps and sites pane

There is a Google support document where this setting is discussed here. It doesn't tell you much though. Just that some apps are old and insecure, and others are modern and secure. Thanks, Google.

It would be helpful if someone could list which protocols and authentication methods are supported (modern and secure), which are deprecated (old and insecure, but allowed if you click this setting), and which are not allowed at all (hopefully plaintext passwords are in this category??).

From what I can divine, "modern and secure" means OAuth 2.0. According to this document, GMail uses OAuth 2.0 for authentication. I will have to test further to see if "allow less secure apps" has actually enabled plaintext passwords, which would be worrisome.

Note that this security option does not seem to be available in standard @gmail.com Gmail accounts, only Google Account accounts. I am not sure whether or how we can enable SMTP access to an @gmail.com account.

  • My first thought is that, since google has blacklisted some legacy SSL primitives over the last couple years, and your printer may not support more recent (still valid) components. In particular SSLv3 blacklisting has affected a number of devices with built-in SSL-related capabilities. Commented Oct 17, 2015 at 3:00
  • Yeah, I had similar thinkings. Printers are not known for running cutting edge firmware. It's a fairly new printer, and I updated its 2014 firmware to a 2015 version, but who knows how up-to-date that will make it? But this is the reason I thought to repeat the test with a desktop mail user agent, which will surely be completely up-to-date.
    – ziggurism
    Commented Oct 17, 2015 at 3:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .