You can send email notifications to your users from anywhere in your application.
Emails use a JSON template for content - no need to wrestle with HTML tables. The JSON is then injected into an email template located in the /emails directory.
This will send an email to the address stored in SUPPORT_EMAILenvironment variable. You can see an example of this in the /help view.
Using Other Mail Providers
Gravity uses nodemailer with the default mail service set to Mailgun.
If you wish to use another mail provider, you can simply install the nodemailer transport package for your chosen service and update the mail.send method in helper/mail.
If you're migrating from a previous version of Gravity, please run the seeds below to populate the database with the email content.
Notification Preferences
Users can't toggle which email notifications they would like to receive in the notifications section of their account.
These settings are stored in the database notifications table. By default, the following preferences are included for you:
new_signin
plan_updated
card_updated
invite_accepted
If you'd like to add more options you, add them to the notifications object in config. This way, all new users will automatically have the these preferences added to the database.