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.
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.
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.