News

Can I still send automated SMTP traffic via GMail in 2023? - Yes!

In the Sysadmin world it is essential to be able to send automated messages via SMTP to carry alerts or status messages of various systems. Whilst it is best to use an on site SMTP server - Exchange or Argo etc  - [or event O365..] sometimes it is useful to have access to a third party system - possibly as backup in case the on-prem or O365 is unavailable.

A few years ago the 'go to' solution was to use GMail - set up a free account and then route traffic through it. But then Google decided - correctly - that this wasn't very secure and so brought in the idea of an 'app password' which was separate to your normal GMail one, and which could then be used for automated tasks, scanners etc.

But even more recently, the 'Create App password' option has vanished from the GMail back end. 

Is that the end? Well no, at least not yet. It is still possible to set up SMTP access via GMail, it's just become more complex.

  1. First of all, log onto the Gmail account you wish to use for automated SMTP traffic.
  2. Under Google Account, Security, turn on 2-Step Verification and probably also set it up to use the Authenticator app. [Unless you use DFA it is no longer possible to set up Application Passwords].
  3. Note that there is no visible menu option to set up 'App Passwords' - This Google Help page is obsolete Instead one needs to go to: https://myaccount.google.com/u/0/apppasswords
  4. Generate a new password:device pair. You can have as many pairs as you need. Note the password as it is not possible to recover it.
  5. Note also that GMail displays it with spaces between the number blocks. These need to be omitted when you use the password for your script/code etc.
  6. Note also if you change your main password for the GMail account then the app password will be deleted and similarly if you turn DFA off the app password is deleted.

So now you have an app password which can be used with your GMail account for automated traffic.

The next part of this post looks as using GMail with PowerShell to send automated traffic.

 

 

 

<< Go back to the previous page