Enable Email Sending

The NodeJS api is able to send emails, but you will need to configure your SMTP settings.

First you will need to own a domain and an email that has SMTP access. Your email provider will mention the host, port and password you should use to send email with SMTP.

Personally I like to use Google Domains to purchase my domains and Mailgun for sending emails (use the Flex plan, not the free trial, it's free for 1000 emails per month with the Flex plan). But you can use any similar provider of your choice.

Open config.js and set all smtp related values:

smtp_enabled: true,
smtp_name: "Tcg Engine",                //Name of sender in emails
smtp_email: "contact@domain.com",     //Email used to send
smtp_server: "smtp.mailgun.org",      //SMTP server URL
smtp_port: "465",
smtp_user: "contact@domain.com",      //SMTP auth user
smtp_password: "ABCDEFGHIJKLMNOP",    //SMTP auth password

The password is usually not the password you use to login to the email provider dashboard. Most of the time there will be a section to generate an app key and you should use that as password.

You will also need to change api_url at the top of config.js, so that confirmation links in your email use the correct url to your api.

Last updated