Many posts and articles, including on this blog, have recommended the use of GMail for sending and receiving mails with Qlik. More recently this has required a switch on the Google Account to Allow Less Secure Apps. Support for this is ending on the 31st May, here’s what you need to know.

Why Use GMail For Sending and Receiving From Qlik?

GMail Inbox

There are a wide number of features within the Qlik ecosystem that require interaction with email. QlikView Enterprise allows sending of alerts on task failures, NPrinting is all about distributing reports and Qlik Sense SaaS has multiple features for sending mails, from task failure notifications to subscriptions to charts or sheets. Beyond the obvious use cases there are many more reasons why you may interact with a mail server, such as Sending Notifications From The Load Script or even using a mail server as a data source, such as in this example of loading router logs.

Many companies use Google Workspace for their internal systems, so using a Workspace account for sending and receiving mail makes sense, and for individuals learning Sense spinning up a GMail account for this purpose is a no cost way of achieving the same result.

Why Allow Access For Less Secure Apps?

Google, and general security best practice, recommend using 2FA for authentication. Google Accounts implement this via Google Prompts (on a signed in phone), text message, the Google Authenticator app or a physical device. Having a third party application (or, ironically, Google’s own email migrate tools) connect to your account via SMTP, IMAP or POP3 is deemed less secure as it inherently uses a username as password only to connect.

The solution for this, for the past couple of years, has been to set a switch on the Google Account that is being used in this way to say that you are comfortable with username and password access to the account in this way. Recently though, a new message has appeared on the dialog where this switch is set:

Less Secure App Switch Dialog

It advises that this access will be revoked from the 30th of May, and the Find Out More link gives a bit more background, but not quite enough. The long and the short is though, that if you are using GMail servers after this date, without an App Password, they will no longer function correctly.

So, How Do I Fix This?

At the bottom of that article there is a link to information on Signing In With App Passwords, this is a much more helpful document. The steps to resolve the issue are outlined here though.

Head to Account Settings and Security for the account you wish to use

Google Security Menu

Turn on 2FA for the account you wish to use

Google Prompt Methods

Select to create an App Password for this account

App Passwords Menu

Select Other from the app list and enter Qlik Sense or similar

Create Google App Password

Copy the generated password to your clipboard

Copy Google App Password

Use the App Password as you would your normal password

Qlik Sense SMTP Settings

You can come back into the App Password settings to manage old passwords and remove them when you no longer use them. Note that when you change the password on the account any App Passwords will be removed, so you will need to recreate these and plumb them back in when this happens. Note that you can not recover an old App Password, so make sure you enter it everywhere you need to before you lose it from your clipboard (or put it in your password safe).

Once all of this has been done your Qlik apps and servers can interact with your Workspace or GMail account without issue, and they will continue to do so after the date which Google removes support for less secure apps.

I hope this post helps you avoid any nasty surprises next month.