1.0.0 • Published 2 years ago

@hkamran/utility-email v1.0.0

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
2 years ago

@hkamran/utility-email

License: AGPL-3.0 npm version

An easy way to send emails (powered by Nodemailer)

Installation

$ npm i @hkamran/utility-email

Usage

  1. Create a transport client with createClient function, passing the server name
    • Make sure the environment variables SMTP_HOSTNAME, SMTP_PORT, SMTP_USERNAME, and SMTP_PASSWORD are set
  2. Send an email with the sendEmail function
    • transport: The transport client created from createClient
    • from: The email you're sending from
    • to: The email you're sending to
    • subject: The email subject
    • html: The HTML version of the email
    • plainText: The plain-text version of the email
    • attachments (optional): A list of attachments
    • listUnsubscribe (optional): A List-Unsubscribe header (more info)
1.0.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago