How to configure a test SMTP email server for Auth0

Introduction

If you build your applications using Auth0 for authentication and authorization you will want to not only test your authentication flows but will rely on them during testing of the other functionality within your software. A key part of this is being able to see and respond to the emails that Auth0 sends.

Auth0 allows you to specify the SMTP settings for each of your Auth0 tenants. Setting up Imitate Email as your test SMTP server is very easy to do:

Step 1: Set up Imitate Email

If you've not already done so please sign up to Imitate Email.

Step 2: Locate your mailbox credentials

Your username

To locate your username go to Settings > My Mailbox where you will find it (it is the same for all mailboxes in your account)

For the password

If you're on the Free or Developer plan or you're setting this up for your personal mailbox copy the password from the same place as the username.

If you're setting this up for a team mailbox go to Settings > Projects and you will find the password next to the symbol for your mailbox. It will look like the following 6bcb69b2-08ac-4c67-911a-10442f7d84b3

Screenshot of Imitate Email personal settings

Step 3: Set up Auth0

  1. Sign in to Auth0 and navigate to Auth0 Dashboard > Branding > Email Provider.

  2. Turn on the Use my own email provider toggle.

  3. Select SMTP Provider

  4. Provide a From email address, enter smtp.imitate.email for the Host, 587 for the Port and then your Username and Password from the previous step.

  5. Click Save or Send test email to see a test email appear in Imitate Email

Screenshot of Auth0 SMTP provider settings

That's it!