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 EmailPassword from "supertokens-node/recipe/emailpassword";import Session from "supertokens-node/recipe/session";import { STMPService } from "supertokens-node/recipe/emailpassword/emaildelivery";
supertokens.init({    appInfo: {        apiDomain: "...",        appName: "...",        websiteDomain: "..."    },    recipeList: [        EmailPassword.init({                        emailDelivery: {                service: new STMPService({                    smtpSettings: {                        host: "...",                        password: "...",                        port: 465,                        from: {                            name: "...",                            email: "...",                        },                        secure: true                    },                })            },        }),        Session.init()    ]});

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