1.0.0 • Published 9 years ago
fluentmail.js v1.0.0
fluentmail.js
Tiny library to send emails fluently. It is heavily inspired from fluentmail.
Installation
npm install fluentmail.js
Features
- Works with SSL and TLS SMTP servers.
- Emails are queued and the queue is sent asynchronously.
Supports utf-8 headers and body.
Requirements
- AUTH access to an SMTP Server.
Use an application specific password, if your service uses two-step authentication.
Example Usage
var mail = new FluentMail({host: "smtp-mail.outlook.com"});
mail.credentials("email-id", "password")
.from("You <username@your-email.com>")
.to(["someone@their-email.com", "another@their-email.com"])
.subject("Hello, testing fluentmail.js")
.body("Let's hope this works!")
.send();
CC & BCC Usage
var mail = new FluentMail({host: "smtp.gmail.com.com"});
mail.credentials("email-id@gmail.com", "password")
.from("You <username@gmail.com>")
.to(["someone@their-email.com", "another@their-email.com"])
.cc(["someone@their-email.com", "someone@their-email.com"])
.bcc(["someone@their-email.com"])
.subject("Hello, testing fluentmail.js")
.body("Let's hope this works!")
.send();
Common SMTP Servers
Name | Server |
---|---|
Gmail | smtp.gmail.com |
Hotmail | smtp.live.com |
Mail.com | smtp.mail.com |
Outlook.com | smtp-mail.outlook.com |
Office365.com | smtp.office365.com |
Yahoo Mail | smtp.mail.yahoo.com |
TODO
- Attachments support
- Unittests
1.0.0
9 years ago