1.0.1 • Published 4 years ago
@fye/email v1.0.1
@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: 'emailFrom@fye.com',
emailTo: ['emailTo@fye.com'],
emailReplyTo: 'emailReplyTo@fye.com',
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);