Gmail for two-factor authentication

For Gmail basic authentication SMTP, you'll most likely need to set up an App Password. If you get a warning referencing error code 5.7.9 when you send a test email, you definitely need to set one up. This is most common with Gmail with two-factor authentication (2FA) but may be necessary for other Gmail configurations.

You'll use the App Password in place of your normal Gmail password. All the other SMTP settings are the same as regular Gmail accounts.

If you're using Google's SMTP, it will automatically override whatever Send From address you use with the SMTP Username, so be sure you're using the best account available to generate your App Password.

To create the App Password:

  1. From the Google Account Settings (https://myaccount.google.com), click on Security on the left.
  2. About halfway down the screen, in the Signing In to Google section, click the App Passwords link.
  3. The next screen creates and manages App Passwords that will work with 2FA. Click on the dropdown to select an app and select 'Custom' to type in 'KnowledgeOwl' (or something else that will identify that this password is for your KB!).
  4. Click Generate.
  5. A 16-digit password will appear. This is good for only a few minutes. Copy it.
  6. In KnowledgeOwl's SMTP settings, paste the 16-digit password you copied instead of the normal Gmail password.
  7. Finish filling out the rest of the SMTP settings using standard Gmail settings and save.

If you do receive error 5.7.9, there's more information on how to resolve it (and more detail on the above steps) available in Google Account Help for Sign in using App Passwords.