@fye/email
v1.0.1
Published
Send emails with this package using Mandrill
Downloads
5
Keywords
Readme
@fye/email
Send emails with this package using Mandrill
Install
yarn add @fye/email
or
npm install @fye/email
Usage
const { sendEmail } = require('@fye/email');
const opts = {
emailFrom: '[email protected]',
emailTo: ['[email protected]'],
emailReplyTo: '[email protected]',
subject: 'Email Subject',
emailHtml: '<p>Email body here<p>',
attachments: [
{
type: 'text/csv',
name: `test-attachement.csv`,
content: Buffer.from(
'heading1,heading2\ndata1,data2',
'utf8',
).toString('base64'),
},
],
mandrillApiKey: 'my-mandrill-key',
};
const result = sendEmail(opts);