loopback-connector-sendmail
v0.0.2
Published
Loopback connector module which allow to send emails via node-sendmail
Downloads
66
Maintainers
Readme
loopback-connector-sendmail
Loopback connector module which allow to send emails via sendmail.
1. Installation
npm install loopback-connector-sendmail --save
2. Configuration
datasources.json
{
"sendmail": {
"connector": "loopback-connector-sendmail",
"silent": false
}
}
model-config.json
{
"Email": {
"dataSource": "sendmail",
"public": false
}
}
3. Use
Basic option same as built in Loopback. Returns a Promise
loopback.Email.send({
to: "[email protected]",
from: "[email protected]",
subject: "subject",
text: "text message",
html: "html <b>message</b>",
var : {
myVar1 : 'a custom value'
},
headers : {
"X-My-Header" : "My Custom header"
}
})
.then(function(response){})
.catch(function(err){});