Admin settings - SMTP

The SMTP page (SMTP stands for Simple Mail Transfer Protocol) in the Platform section of the Admin menu lets you configure your email settings. Looker instances send emails in many situations, including new user notifications, password resets, and administrative notifications, as well as when users deliver content such as dashboards and Looks.

Mail settings

In Looker's Admin panel, choose SMTP to see and change your instance's SMTP settings. You can use the default mail settings to take advantage of Looker's email service, without the need for additional configuration.

To use a different email service, select Use custom mail settings. Looker supports two authentication methods for custom SMTP: Basic Authentication (username and password) and OAuth 2.0.

Custom mail settings can be configured for SMTP servers that support the PLAIN and LOGIN authentication protocols or OAuth 2.0.

Custom mail settings

Enter the appropriate values for your email service's SMTP settings:

  • Mail server: The URL of your SMTP server. If you change this setting, you must re-enter the SMTP server password for Basic authentication or the OAuth client secret value for OAuth.
  • From: The name to display as the sender of your Looker emails (see Testing Custom Email Settings for an example). You can enter a name string and an email address encased in angle brackets (for example, Display Name <email@address.com>) or an email address without angle brackets (for example, email@address.com). Special characters, other than the @ symbol in an email address and the surrounding angle brackets, if applicable, are not supported.
  • User Name: The username that's needed to gain access to your SMTP server.
  • Password: The password that's needed to gain access to your SMTP server.
  • Port: The port to use for your SMTP server. If you change this setting, you must re-enter the SMTP server password for Basic authentication or the OAuth client secret value for OAuth.

  • TLS/SSL: If your SMTP server uses the TLS or SSL protocols for more secure email, select this option. Looker displays a drop-down menu of supported TLS and SSL versions. Select your protocol version. For TLS, TLS 1.2 is recommended.

  • Authentication type: Select Basic authentication to configure a username and password to authenticate to your SMTP server, or select OAuth to configure OAuth 2.0 authentication. When you provide valid credentials, you can switch between authentication types without interrupting email service.

Basic authentication

Enter the Username and Password required to authenticate to your SMTP server.

OAuth 2.0 authentication

Select this option if your SMTP provider uses OAuth 2.0 to authenticate. This method is required for services like Microsoft Office 365, which is deprecating basic authentication.

Enter the following information from your email provider:

  • OAuth client ID: The client ID of the application that you created in your email provider's admin console.
  • OAuth client secret: The client secret for the application.
  • Token URL: The URL where Looker will exchange credentials for an access token.
  • Scopes: The URLs of the scopes that your email provider requires. For example, to assign the Microsoft identity platform .default scope, enter https://outlook.office365.com/.default.
Requirements for re-entering the OAuth client secret

To save or test OAuth 2.0 SMTP settings, you must re-enter the OAuth client secret value whenever you perform either of the following actions:

  • Configure OAuth when custom OAuth SMTP settings aren't already saved (for example, when configuring OAuth for the first time or when switching from Basic authentication).
  • Change the Mail server, Port, OAuth client ID, or Token URL value.

To re-enter the secret in an existing OAuth 2.0 configuration, click the Edit OAuth client secret toggle to the on position. If you don't change those four settings when you update other fields, such as From, TLS/SSL, or Scopes, Looker reuses the stored client secret.

The same requirement applies when you configure SMTP settings through the Looker API set_smtp_settings endpoint with an SmtpSettings request body.

Generating OAuth credentials

You'll need to create an application within your email provider's platform to generate the client ID, client secret, and token URL. For more information about creating an application, see the following pages:

Saving SMTP settings

Once you have entered your SMTP settings, click the Save button to save your configuration. You can also test your settings, or refresh the page to see if your configuration has any errors.

Looker restricts how often Looker admins can save or test the SMTP settings to prevent using this feature to scan for open ports.

Testing custom email settings

To test your custom email setup, use the Send Test Email button. This test works for both Basic Authentication and OAuth 2.0 settings. Looker will attempt to send a test email to the user who pressed the button. The test email has the following attributes:

  • The sender is admin@looker.com.
  • The subject is Looker Mail Test.
  • The email body text is Looker mail is working!

To prevent malicious agents from scanning for open ports, Looker restricts how frequently Looker admins can test the SMTP settings.

SMTP error messages

If there are any problems with your SMTP configuration, Looker alerts all admins in the following locations:

  • A warning message on the SMTP page
  • A warning icon next to the SMTP listing in the Admin sidebar

These errors are visible to all admins on your Looker instance. You can check for errors immediately by refreshing the page after saving custom mail settings.

Errors related to custom email settings tests appear below the Save and Send Test Email buttons at the bottom of the SMTP page.