Creates a queue for sending emails.
Works with multiple servers.
meteor add nicolaslopezj:email-queue
Replace Email.send(options)
with EmailQueue.send(options)
.
EmailQueue.send({
to: '[email protected]',
from: '[email protected]',
subject: 'Test email',
html: 'Hello'
});
Set this variables anywhere in server.
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)