mail-time
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -1,3 +0,1 @@ | ||
Changelog | ||
========= | ||
For full changelog see [releases](https://github.com/VeliovGroup/Mail-Time/releases) in GitHub |
@@ -1,3 +0,1 @@ | ||
History | ||
========= | ||
For full history see [releases](https://github.com/VeliovGroup/Mail-Time/releases) in GitHub |
{ | ||
"name": "mail-time", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Bulletproof email queue on top of NodeMailer with support of multiple clusters and servers setup", | ||
@@ -52,13 +52,13 @@ "main": "index.js", | ||
"deepmerge": "^4.2.2", | ||
"josk": "^2.2.2" | ||
"josk": "^2.2.3" | ||
}, | ||
"devDependencies": { | ||
"bson": "^4.0.2", | ||
"bson": "^4.0.3", | ||
"bson-ext": "^2.0.3", | ||
"chai": "^4.2.0", | ||
"mocha": "^6.2.2", | ||
"mongodb": "^3.3.5", | ||
"nodemailer": "^6.3.1", | ||
"mocha": "^7.1.0", | ||
"mongodb": "^3.5.4", | ||
"nodemailer": "^6.4.4", | ||
"nodemailer-direct-transport": "^3.3.2" | ||
} | ||
} |
111
README.md
@@ -23,4 +23,4 @@ # MailTime | ||
- [Installation](https://github.com/VeliovGroup/Mail-Time#installation) | ||
- [Install](https://github.com/VeliovGroup/Mail-Time#installation--import-via-npm) as [NPM Package](https://www.npmjs.com/package/mail-time) | ||
- [Install](https://github.com/VeliovGroup/Mail-Time#installation--import-via-atmosphere) as [Atmosphere package](https://atmospherejs.com/ostrio/mailer) | ||
- [Meteor.js Installation](https://github.com/VeliovGroup/Mail-Time#installation--import-via-npm): as [NPM Package](https://www.npmjs.com/package/mail-time) | ||
- [Meteor.js Installation](https://github.com/VeliovGroup/Mail-Time#installation--import-via-atmosphere): as [Atmosphere package](https://atmospherejs.com/ostrio/mailer) | ||
- [Usage example](https://github.com/VeliovGroup/Mail-Time#basic-usage) | ||
@@ -36,6 +36,6 @@ - [API](https://github.com/VeliovGroup/Mail-Time#api) | ||
- ๐ทโโ๏ธ ~92% tests coverage | ||
- ๐ฆ Two simple dependencies, written from scratch for top performance | ||
- ๐ Synchronize email queue across multiple servers | ||
- ๐ช Bulletproof design, built-in retries | ||
- ๐จโ๐ฌ ~92% tests coverage; | ||
- ๐ฆ Two simple dependencies, written from scratch for top performance; | ||
- ๐ข Synchronize email queue across multiple servers; | ||
- ๐ช Bulletproof design, built-in retries. | ||
@@ -144,30 +144,2 @@ ## How does it work?: | ||
## Installation & Import (*via NPM*): | ||
Install NPM *MailTime* package: | ||
```shell | ||
meteor npm install --save mail-time | ||
``` | ||
ES6 Import: | ||
```js | ||
import MailTime from 'mail-time'; | ||
``` | ||
## Installation & Import (*via Atmosphere*): | ||
Install Atmosphere *ostrio:mailer* package: | ||
```shell | ||
meteor add ostrio:mailer | ||
``` | ||
ES6 Import: | ||
```js | ||
import MailTime from 'meteor/ostrio:mailer'; | ||
``` | ||
## Basic usage | ||
@@ -295,2 +267,73 @@ | ||
## Meteor.js usage: | ||
### Meteor.js Installation: | ||
#### Installation & Import (*via NPM*): | ||
Install NPM *MailTime* package: | ||
```shell | ||
meteor npm install --save mail-time | ||
``` | ||
ES6 Import: | ||
```js | ||
import MailTime from 'mail-time'; | ||
``` | ||
#### Installation & Import (*via Atmosphere*): | ||
Install Atmosphere *ostrio:mailer* package: | ||
```shell | ||
meteor add ostrio:mailer | ||
``` | ||
ES6 Import: | ||
```js | ||
import MailTime from 'meteor/ostrio:mailer'; | ||
``` | ||
### Usage: | ||
```js | ||
import { MongoInternals } from 'meteor/mongo'; | ||
import MailTime from 'mail-time'; | ||
import nodemailer from 'nodemailer'; | ||
// Use DIRECT transport | ||
// To enable sending email from localhost | ||
// install "nodemailer-direct-transport" NPM package: | ||
import directTransport from 'nodemailer-direct-transport'; | ||
const transports = []; | ||
const directTransportOpts = { | ||
pool: false, | ||
direct: true, | ||
name: 'mail.example.com', | ||
from: 'no-reply@example.com', | ||
}; | ||
transports.push(nodemailer.createTransport(directTransport(directTransportOpts))); | ||
// IMPORTANT: Copy-paste passed options from directTransport() to | ||
// transport's "options" property, to make sure it's available to MailTime package: | ||
transports[0].options = directTransportOpts; | ||
//////////////////////// | ||
// For more transports example see sections above and read nodemailer's docs | ||
//////////////////////// | ||
const mailQueue = new MailTime({ | ||
db: MongoInternals.defaultRemoteCollectionDriver().mongo.db, // MongoDB | ||
transports, | ||
from(transport) { | ||
// To pass spam-filters `from` field should be correctly set | ||
// for each transport, check `transport` object for more options | ||
return '"Awesome App" <' + transport.options.from + '>'; | ||
} | ||
}); | ||
``` | ||
## API | ||
@@ -297,0 +340,0 @@ |
Sorry, the diff of this file is not supported yet
44690
441
Updatedjosk@^2.2.3