👥
User Login API
  • Getting Started
    • User Login API
    • Install Server Locally
    • Test with Insomnia
    • Cloud Server Installation
    • Remote Access and DB Authentication
    • Enable HTTPS
    • Enable Email Sending
  • Requests
    • Unity Requests
    • Register and Login
    • Get Users
    • Edit Users
    • Gain Rewards
    • Contacts/Friends
    • Activity
  • Other
    • Custom Code and Data
    • NetcodePlus Integration
    • Support and Community
Powered by GitBook
On this page
  1. Getting Started

Enable Email Sending

Last updated 2 years ago

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 to purchase my domains and for sending emails (it's free for 1000 emails per month with Pay as You Go 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: "User API",                //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 API key and you should use that as password.

Google Domains
Mailgun