open-index/open-npm huggingface dataset:
npm package: @fye/email
Description: Send emails with this package using Mandrill
Latest version: 1.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);
```