Skip to main content

Provide SMTP configuration

Using this method, you can:

  • Send emails using your own domain
  • Optionally customise the default email templates and subject.
import supertokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";
import Session from "supertokens-node/recipe/session";
import EmailVerification from "supertokens-node/recipe/emailverification"
import { SMTPService as EmailVerificationSMTPService } from "supertokens-node/recipe/emailverification/emaildelivery";

let smtpSettings = {
host: "...",
authUsername: "...", // this is optional. In case not given, will be used
password: "...",
port: 465,
from: {
name: "...",
email: "...",
secure: true

appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
recipeList: [

// if email verification is enabled..
emailDelivery: {
service: new EmailVerificationSMTPService({smtpSettings})

To learn about how to customise the default email templates or the subject, please see the next section.

Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI