Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apla/dataflows-task-mail
email task for dataflows
https://github.com/apla/dataflows-task-mail
Last synced: 8 days ago
JSON representation
email task for dataflows
- Host: GitHub
- URL: https://github.com/apla/dataflows-task-mail
- Owner: apla
- License: mit
- Created: 2015-11-22T13:59:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-26T04:17:25.000Z (about 9 years ago)
- Last Synced: 2024-12-17T11:42:26.478Z (about 1 month ago)
- Language: JavaScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dataflows-task-mail
email task for dataflows[![build](https://travis-ci.org/apla/dataflows-task-mail.svg)](https://travis-ci.org/apla/dataflows-task-mail)
[![NPM Version](http://img.shields.io/npm/v/dataflows-task-mail.svg?style=flat)](https://www.npmjs.org/package/dataflows-task-mail)
[![codecov.io](https://codecov.io/github/apla/dataflows-task-mail/coverage.svg?branch=master)](https://codecov.io/github/apla/dataflows-task-mail?branch=master)Batch sending of emails
- supports templates
- doesn't support guaranteed delivery of emails
- doesn't support guaranteed sending of emails (sends to smtp transport)However, transport errors logged to console as warnings.
The task is completed as soon as all required fields for email sending are
present and all emails are forwarded to smtp transport for sending.If there are problems with template, contents or recipients list task will fail.
### Synopsis
Tests have usage examples for dataflows and standalone.
### Parameters
**fields** - email fields to send. If we're using recipients list
email fields structure will be used as defaults```javascript
fields = {
from: {String},
to: {Array|String},
cc: {String}, // optional
bcc: {String}, // optional
subject: {String},
text: {String}, // hardcoded text
html : {String}, // hardcoded html
template : {String}, // template directory to use by [email-templates](https://github.com/niftylettuce/node-email-templates)
attachments: {Array} // optional
}
```**vars** - variables to expand in template
**transport** - transport parameters
```javascript
var mandrillTransport = {
plugin: "nodemailer-mandrill-transport",
config: {
auth: {apiKey: "kNjbd7IINJy5bEMf19sf2A"}
}
}var sendmailTransport = {
"plugin": "nodemailer-sendmail-transport",
"config": {
"path": "sendmail",
"args": []
}
};
```Without dataflows project you need to pass whole transport configuration
in transport key and can use full paths for templates (absolute or within current dir)