@open-source-initiative/notify-email
v1.0.7
Published
Nodemailer wrapper for simple "send email" cases
Downloads
5
Readme
notify-email-library
Nodemailer wrapper to conveiently help setup emails.
Get started
run the following command in your project root directory
npm i @open-source-initiative/notify-email
Usage
import * as Notify from '@open-source-initiative/notify-email';
const configs = Notify.EmailConfigs.buildBasicConfigs({ username: '[email protected]', password: 'xxxxxxxx', host: 'mail.com' }, {/** Valid Nodemailer config options*/ })
const Email = new Notify.Email(configs);
const sendEmail = async () => {
/**
* @params { valid nodemailer send options }
*/
await Email.sendEmail({
from: `My Company Name <[email protected]>`,
to: '[email protected]',
subject: "Test Email",
html: `<h1>Notify::Email::Hello world</h1>`
});
}
Support
Email: [[email protected]] Mobile: +260975247994