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 Passwordless from "supertokens-node/recipe/passwordless";
import Session from "supertokens-node/recipe/session";
import { SMTPService } from "supertokens-node/recipe/passwordless/emaildelivery";

appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
recipeList: [
emailDelivery: {
service: new SMTPService({
smtpSettings: {
host: "...",
authUsername: "...", // this is optional. In case not given, will be used
password: "...",
port: 465,
from: {
name: "...",
email: "...",
secure: true

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