Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fliplet/fliplet-widget-email-provider
Email Provider
https://github.com/fliplet/fliplet-widget-email-provider
email widget
Last synced: about 5 hours ago
JSON representation
Email Provider
- Host: GitHub
- URL: https://github.com/fliplet/fliplet-widget-email-provider
- Owner: Fliplet
- Created: 2017-05-19T10:37:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T09:46:16.000Z (over 2 years ago)
- Last Synced: 2023-08-02T02:34:09.595Z (over 1 year ago)
- Topics: email, widget
- Language: JavaScript
- Size: 41 KB
- Stars: 0
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Email provider
## Provider usage
```js
Fliplet.Widget.open('com.fliplet.email-provider', {
data: {
subject: 'Hello world'
}
}).then(function (result) {});
```## Sample result
```json
{
"subject": "Hi {{name}}",
"html": "Hi {{name}}, how are you?
",
"to": [
{
"email": "[email protected]",
"name": "Alice"
},
{
"email": "[email protected]"
},
{
"email": "{{email}}",
"name": "{{name}}"
}
]
}
```---
## Using the provider result
### 1. As a data source hook
```js
Fliplet.DataSources.update(1, {
hooks: [{
runOn: ["insert", "update"],
type: "email",
payload: result
}]
});
```### 2. As a data source validation template
```js
Fliplet.DataSources.update(1, {
definition: {
validtion: {
email: {
template: result,
..,
..
}
}
}
});
```### 3. As a template for `fliplet-communicate`
```
Fliplet.Communicate.sendEmail(result);
```