Socket
Socket
Sign inDemoInstall

mail-time

Package Overview
Dependencies
18
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.6 to 0.1.7

7

index.js

@@ -237,6 +237,11 @@ var JoSk = require('josk');

var _mailOpts = {};
if (transport._options.mailOptions) {
if (transport._options && typeof transport._options === 'object' && transport._options.mailOptions) {
_mailOpts = merge(_mailOpts, transport._options.mailOptions);
}
if (transport.options && typeof transport.options === 'object' && transport.options.mailOptions) {
_mailOpts = merge(_mailOpts, transport.options.mailOptions);
}
if (task.mailOptions.length === 1) {

@@ -243,0 +248,0 @@ _mailOpts = merge(_mailOpts, task.mailOptions[0]);

2

package.json
{
"name": "mail-time",
"version": "0.1.6",
"version": "0.1.7",
"description": "Bulletproof email queue on top of NodeMailer with support of multiple clusters and servers setup",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -120,3 +120,3 @@ MailTime

Require package:
```jsx
```js
const MailTime = require('mail-time');

@@ -126,3 +126,3 @@ ```

Create nodemailer's transports (see [nodemailer docs](https://github.com/nodemailer/nodemailer/tree/v2#setting-up)):
```jsx
```js
const transports = [];

@@ -164,3 +164,3 @@

We will need connect to MongoDB first:
```jsx
```js
const MongoClient = require('mongodb').MongoClient;

@@ -190,4 +190,4 @@ const MailTime = require('mail-time');

Create the Client to add emails to queue from other application units, like UI unit:
```jsx
Create the *Client* to add emails to queue from other application units, like UI unit:
```js
const MongoClient = require('mongodb').MongoClient;

@@ -207,3 +207,3 @@ const MailTime = require('mail-time');

Send email:
```jsx
```js
MailQueue.sendMail({

@@ -248,3 +248,3 @@ to: 'user@gmail.com',

Simple and bulletproof HTML template, see its [source](https://github.com/VeliovGroup/Mail-Time/blob/master/template.html). Usage:
```jsx
```js
// Make it default

@@ -266,3 +266,3 @@ const MailQueue = new MailTime({

### Template Example
```jsx
```js
MailQueue.sendMail({

@@ -273,3 +273,3 @@ to: 'user@gmail.com',

text: 'Hello {{userName}}, \r\n Thank you for registration \r\n Your login: {{to}}',
html: '<div style="text-align: center"><h1>Hello {{userName}}</h1><p><ul><li>Thank you for registration</li><li>Your login: {{to}}</li></ul></p></div>'
html: '<div style="text-align: center"><h1>Hello {{userName}}</h1><p><ul><li>Thank you for registration</li><li>Your login: {{to}}</li></ul></p></div>',
template: '<body>{{{html}}}</body>'

@@ -276,0 +276,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc