bulkhead-mailer
A Bulkhead service that allows SailsJS projects to easily use NodeMailer.
Quick Start
npm install bulkhead-mailer
Then we have to setup the configuration by creating a file called config/mailer.js
in your project root folder. It must look like this:
moduleexports = config;
This will automatically use STMP with no authentication credentials. To change your email server settings, change the config/mailer.js
file to this:
var config = config;configauthuser = 'Your STMP user name';configauthpass = 'Your STMP password';moduleexports = config;
For more configurating settings, please read up on how to user Nodemailer.
To utilize the mailing service, do the following in a controller:
// SomeController.jsvar mailer = ; moduleexports = { mailerservice; }