Skip to main content Skip to complementary content

SMTP OAuth

The Qlik SMTP OAuth connector lets you connect to an SMTP server of your choice and then use it to deliver outgoing emails. This can be used to report errors or send confirmation when a scheduled reload has been completed.

Creating an OAuth application on your provider

To use this connector, you need to create an OAuth application on your chosen third-party provider (for example, Gmail, Outlook, etc). Qlik does not provide OAuth applications for these services.

The creation requirement and restrictions (such as account type) are determined by each provider. Your provider controls token expiration and refresh policies.

Refer to your provider’s documentation for instructions on creating OAuth applications.

Authentication

To access your SMTP server, you need to authenticate the connector with your SMTP server details. After you create a new connection and select SMTP as your connector, you need to enter the server address along with your username and password. You also need to choose an appropriate port and an SSL mode for the connection to the server.

OAuth

Account properties that can be configured
Authentication field Description Required
OAuth Endpoint Enter the OAuth URL for authorization calls Yes
OAuth Token Endpoint Enter the OAuth URL to obtain the token from the server Yes
OAuth Scopes Enter the scope URI

Yes

OAuth Client ID Client ID for SMTP OAuth authentication Yes
OAuth Client Secret Client secret for SMTP OAuth authentication Yes
Prompt/consent level This instructs the type of OAuth authentication request. Consent forces to show the authorization consent to the application. select_account forces to show the account selector. The service you use dictates which OAuth request is required. Yes
SMTP Server Enter the SMTP server address. Yes
Port Default port is 465 for implicit SSL/TLS. Default port is 587 for explicit SSL (StartTLS). Yes
SSL Mode Select implicit (SSL/TLS) or explicit (StartTLS). Yes

Account properties

Credentials

Credentials are used to prove that a user is allowed to access the data in a connection.

There are two types of credentials that can be used when making a connection in Qlik Sense SaaS. If you leave the User defined credentials check box deselected, then only one set of credentials will be used for the connection. These credentials belong to the connection and will be used by anyone who can access it. For example, if the connection is in a shared space, every user in the space will be able to use these credentials. This one-to-one mapping is the default setting.

If you select User defined credentials, then every user who wants to access this connection will need to input their own credentials before selecting tables or loading data. These credentials belong to a user, not a connection. User defined credentials can be saved and used in multiple connections of the same connector type.

In the Data load editor, you can click the Primary key underneath the connection to edit your credentials. In spaces or Data manager, you can edit credentials by right-clicking on the connection and selecting Edit Credentials.

See which authentication type applies on each connector's page.

Account properties that can be configured
Account property Description
User defined credentials Select this check box if you want users that access this connection to have to input their own credentials. Deselect this check box if credentials can be shared with anyone who has access to this connection.
New credentials Drop-down menu item that appears if User defined credentials is selected.
Credentials name Name for the new credential.
Existing credentials Drop-down menu item that appears if User defined credentials is selected.
Username Username for the connection.

Click the Authenticate button to authenticate the connection.

Supported scopes

SMTP whitelisted scopes

The following scopes are whitelisted for the specific services below. This list is not exhaustive and there could be other supported services

Gmail

For more information, see OAuth 2.0 Mechanism.

  • Gmail requires "https://mail.google.com/" for SMTP.

Microsoft Outlook

For more information, see Authenticate an IMAP, POP or SMTP connection using OAuth.

  • https://outlook.office.com/SMTP.Send

  • https://outlook.office365.com/.default

Yahoo

For more information, see Authenticating Yahoo accounts with Nylas.

  • email

  • mail-w

Fastmail

For more information, see Fastmail API Documentation.

  • urn:ietf:params:jmap:core

  • urn:ietf:params:jmap:submission

OpenID Connect Standard long term refresh token scope

For more information, see OpenID Connect Core 1.0 incorporating errata set 2.

  • Offline_access

Loading data from tables

After you authenticate the connector with your credentials, you can use the following table:

Tables that can be loaded
Table Description
SendEmail Use this table to send out emails.

To send out an email using the table, enter the required parameters and click Preview data. By clicking Preview data the table will try to send an email out to the email address you entered in the To and CC parameters. Required parameters are marked with an asterisk (*). The table fields are displayed under the Data preview tab. You can select fields individually by selecting the box beside each field name. Select Insert script after you have made your selection. For more information, see Selecting data from tables.

Checking the status

The table field status informs you whether the email has been sent or not. This does not guarantee that the email was delivered. To check if the email was delivered you need to check the recipient inbox.

There are various reasons why a sent email is not delivered. For example, if the recipient's:

  • Email address does not exist.
  • Inbox is full.
  • Email service has blocked the email.

Troubleshooting

You receive an error message that the connection to the SMTP server failed

Possible cause

The SSL Mode parameter has not been set up correctly.

Proposed action

Choose a different SSL mode. Make sure that you are using an encrypted connection. Unencrypted connections are not supported.

You cannot send out emails

Possible cause Possible causes

There are many possible causes preventing you from sending out emails. For example:

  • The From Email address is different and not linked to the authenticated user.
  • The mail service has spam protection enabled, preventing multiple email recipients.

Proposed action Proposed actions

Do one of the following:

  • Make sure that the email address used in the From Email parameter is linked to the authenticated user. Check the authenticated account settings on your mail server.
  • Check that the mail service allows emails to be sent out to multiple recipients.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!