Skip to main content

Customising the email sent

The default email#

  • From: [email protected], but the user will see your app name
  • Subject: Email verification instructions
UI of the verification email sent to the registered user

This is achieved by calling an API provided by us ( The backend SDK calls our API with the verify email link, app name and the email of the end user.

  • We do not log / store any of this information in our servers.
  • For production use, we recommend that you use the feature to send emails yourself (see below section), using your own domain. This will make it easier for end users to trust the email (since it's coming from your domain, and not from

Send a custom email#

You can take full control of sending an email verification email by providing the createAndSendCustomEmail function during init function call:

import supertokens from "supertokens-node";import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";import Session from "supertokens-node/recipe/session";
supertokens.init({    appInfo: {        apiDomain: "...",        appName: "...",        websiteDomain: "..."    },    recipeList: [        ThirdPartyEmailPassword.init({            emailVerificationFeature: {                createAndSendCustomEmail: async (user, emailVerificationURLWithToken) => {                    let { id, email } = user;                    // TODO:                }            }        }),        Session.init()    ]});
  • You can get the user's email via the user input param.
  • Your email must direct the user to open the emailVerificationURLWithToken link. This link is a full URL, with the email verification token. It points to the email verification page on your website (/auth/email-verify by default).
  • Any errors thrown from this function will be ignored.

When using this callback, you must manage sending the email yourself.