Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nicolaslopezj/email-queue

Add emails to a queue and send them one by one
https://github.com/nicolaslopezj/email-queue

Last synced: 13 days ago
JSON representation

Add emails to a queue and send them one by one

Awesome Lists containing this project

README

        

# Email Queue

Creates a queue for sending emails.

Works with multiple servers.

```sh
meteor add nicolaslopezj:email-queue
```

### Usage

Replace ```Email.send(options)``` with ```EmailQueue.send(options)```.

```js
EmailQueue.send({
to: '[email protected]',
from: '[email protected]',
subject: 'Test email',
html: 'Hello'
});
```

### Options

Set this variables anywhere in server.

```js
EmailQueue.noEmailsWaitTime = 1000; // Loop sleep time when there are no emails (default: 1000)
EmailQueue.betweenEmailsWaitTime = 10; // Loop sleep time when there are emails (default: 10)
```