@ansaro/emailer

0.1.3 • Public • Published

Emailer

Sends an email 💌

yarn add @ansaro/emailer

Usage

Set environment variable SES_SOURCE to an email address that the email should be sent from (e.g. no-reply@example.tld).

sendEmail is an asynchronous function that takes these arguments:

  • recipients list of email addresses to send email to
  • subject is the subject for the email
  • bodyText is the text version of the email
  • bodyHTML is the HTML version of the email
const { sendEmail } = require("@ansaro/emailer");

const recipients = ["max.beatty@ansaro.ai"];
const subject = "Hello World";
const bodyText = "This is a plain email";
const bodyHTML = "<p>This is a <strong>nice</strong> email</p>";

async function () {
    await sendEmail(recipients, subject, bodyText, bodyHTML);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @ansaro/emailer

Weekly Downloads

4

Version

0.1.3

License

ISC

Unpacked Size

3.57 kB

Total Files

5

Last publish

Collaborators

  • bgoldberg15
  • maxbeatty