Docs

Use Your Own SMTP Email Provider

Use Your Own SMTP Email Provider

Auth0 allows you to configure your own SMTP email provider so you can more completely manage, monitor, and troubleshoot your email communications.

Auth0's built-in email infrastructure should be used for testing-level emails only.

Auth0 currently supports the following providers:

You can only configure one email provider, which will be used for all emails.

Whitelist IP addresses

To ensure that emails can be sent from Auth0 to your SMTP, you must open the right ports and allow inbound connections from specific IP addresses. To get the list of IPs, navigate to Dashboard > Emails > Provider.

Configure Amazon SES

To use the Amazon SES API to send emails, you must complete several configuration steps. First, though, you need to decide which credentials you want to use:

  • API Credentials
  • SMTP Credentials (the secret is usually 44 characters long)

For more info about SES credentials, see Amazon's Using Credentials With Amazon SES.

Use API credentials

  1. Sign up for an Amazon AWS account, or log in.

  2. Verify your domain.

  3. Verify email addresses

  4. Request production access.

  5. Get your AWS access keys. Copy these keys; you will need to enter these values into Auth0.

  6. Attach a policy with the proper permissions. Attach a policy with the ses:SendRawEmail and ses:SendEmail permissions, as in this example:

    Attach AWS Policy

  7. Navigate to Auth0 Custom Email Providers. Activate the Use my own email provider toggle, and click the Amazon Web Services logo.

    Select Email Provider

  8. Provide a From email address, enter your AWS Access Key Id and Secret Access Key, select your Region, and click Save:

    Enter AWS API Email Provider Values

You can now send a test email using the Send Test Email button. If you have configured everything correctly, you will receive a confirmation email. If you do not receive an email after a few minutes, please check your Auth0 logs for any failures.

The Amazon SES console will now display delivery insights for all emails that have been sent to your users.

Use SMTP credentials

  1. Sign up for an Amazon AWS account, or log in.

  2. Verify your domain.

  3. Request production access.

  4. Get your SMTP credentials. Copy the security credentials; you will need to enter these values into Auth0.

  5. Navigate to Auth0 Custom Email Providers. Activate the Use my own email provider toggle, and click the SMTP logo.

    Select Email Provider

  6. Provide a From email address, then enter your SMTP server Host, Port, Username, and Password, and click Save. You can use email-smtp.us-east-1.amazonaws.com (using the appropriate region rather than us-east-1) for Host and 587 for Port.

    Enter AWS SMTP Email Provider Values

You can now send a test email using the Send Test Email button. If you have configured everything correctly, you will receive a confirmation email. If you do not receive an email after a few minutes, please check your Auth0 logs for any failures.

The Amazon SES console will now display delivery insights for all emails that have been sent to your users.

Configure Mandrill

  1. Sign up for a Mandrill account, or log in.

  2. Navigate to Mandrill Settings, and click Add API key. Copy this key value.

  3. Navigate to Auth0 Custom Email Providers. Activate the Use my own email provider toggle, and click the Mandrill logo.

    Select Email Provider

  4. Provide a From* email address, enter the Mandrill API Key you previously copied, and click Save:

    Enter Mandrill Email Provider Values

You can now send a test email using the Send Test Email button. If you have configured everything correctly, you will receive a confirmation email. If you do not receive an email after a few minutes, please check your Auth0 logs for any failures.

The Mandrill Outbound Activity page will now display delivery insights for all emails that have been sent to your users.

Configure SendGrid

  1. Sign up for a SendGrid account, or log in. (If you have a Microsoft Azure subscription, you can get a free account in the Azure Marketplace.)

  2. Navigate to SendGrid Settings > API Keys, and click Create API Key. Provide a name for your key, enable Full Access for Mail Send permissions, and click Save. Copy this key value.

  3. Navigate to Auth0 Custom Email Providers. Activate the Use my own email provider toggle, and click the SendGrid logo.

    Select Email Provider

  4. Provide a From email address, enter the SendGrid API Key you previously copied, and click Save:

    Enter SendGrid Email Provider Values

You can now send a test email using the Send Test Email button. If you have configured everything correctly, you will receive a confirmation email. If you do not receive an email after a few minutes, please check your Auth0 logs for any failures.

The SendGrid Email Activity page will now display delivery insights for all emails that have been sent to your users.

Configure SparkPost

  1. Sign up for a SparkPost account, or log in.

  2. Navigate to SparkPost Sending Domains, and add your custom domain. SparkPost allows sending emails from only verified domains.

  3. Navigate to SparkPost Account API Keys, and click New API key. Save this key value and ensure it has Transmissions: Read/Write access. Copy this key value.

  4. Navigate to Auth0 Custom Email Providers. Activate the Use my own email provider toggle, and click the SparkPost logo.

    Select Email Provider

  5. Provide a From email address, enter the SparkPost API Key you previously copied, select your Region, and click Save:

    Enter SparkPost Email Provider Values

If you are changing to the EU region in an account that was already configured for the US region, you must replace the API Key in Auth0 with a Sparkpost EU API Key.

You can now send a test email using the Send Test Email button. If you have configured everything correctly, you will receive a confirmation email. If you do not receive an email after a few minutes, please check your Auth0 logs for any failures.

If you haven't registered a custom domain with SparkPost, you can send a maximum of five test emails from the sparkpostbox.com domain. For more info, see SparkPost's Transmissions: The Sandox Domain.

The SparkPost Message Events page will now display delivery insights for all emails that have been sent to your users.

Configure Mailgun

  1. Sign up for a Mailgun account, or log in.

  2. Navigate to Mailgun Sending > Domains, and add your custom domain. Mailgun allows sending emails from only verified domains.

  3. Navigate to Mailgun Settings > API Keys. Your API key was created when you signed up for your account; copy it from Private API Key.

  4. Navigate to Auth0 Custom Email Providers. Activate the Use my own email provider toggle, and click the Mailgun logo.

    Select Email Provider

  5. Provide a From email address, enter the Domain you previously added to Mailgun, enter the Mailgun API Key you previously copied, select your Region, and click Save:

    Enter Mailgun Email Provider Values

You can now send a test email using the Send Test Email button. If you have configured everything correctly, you will receive a confirmation email. If you do not receive an email after a few minutes, please check your Auth0 logs for any failures.

The Mailgun Dashboard will now display delivery insights for all emails that have been sent to your users.

Configure a custom SMTP server

When using your own SMTP server to send email, the server must:

  • support LOGIN authentication.
  • support TLS 1.0 or higher.
  • use a certificate signed by a public certificate authority (CA).

If your SMTP server meets these criteria, then:

  1. Navigate to Auth0 Custom Email Providers. Activate the Use my own email provider toggle, and click the SMTP logo.

    Select Email Provider

  2. Provide a From email address, then enter your SMTP server Host, Port, Username, and Password, and click Save:

    Enter Custom SMTP Email Provider Values

Common ports include 25 and 587. Please avoid using port 25 if you can because many providers have limitations on this port.

You can now send a test email using the Send Test Email button. If you have configured everything correctly, you will receive a confirmation email. If you do not receive an email after a few minutes, please check your Auth0 logs for any failures.

Test services

SMTP makes it easy to set up test services that allow you to test that your setup is working without spamming your users. For more info, see Set Up a Test SMTP Provider.

Keep reading