loopback-connector-sendgrid
Loopback connector module which allow to send emails via SendGrid
npm install loopback-connector-sendgrid --save
datasources.json
{
"sendgrid": {
"connector": "loopback-connector-sendgrid",
"api_user": '[your username here]'
"api_key": '[your password here]'
}
}
model-config.json
{
"Email": {
"dataSource": "sendgrid",
"public": false
}
}
Configuration in JavaScript
var DataSource = require('loopback-datasource-juggler').DataSource;
var dsSendGrid = new DataSource('loopback-connector-sendgrid', {
api_user: '[your username here]'
api_key: '[your password here]'
});
loopback.Email.attachTo(dsSendGrid);
Basic option same as built in Loopback
loopback.Email.send({
to: "[email protected] ",
from: "[email protected] ",
subject: "subject",
text: "text message",
html: "html <b>message</b>"
},
function(err, result) {
if(err) {
console.log('Upppss something crash');
return;
}
console.log(result);
});
documented by jsdoc-to-markdown .
Type
ID
Summary
Version: 1.1.4 - released 2015-08-25
Non-functional
MDLPCNSG-15
Package: Update development dependencies and configure for travis-ci
Version: 1.1.3 - released 2015-07-21
Non-functional
MDLPCNSG-14
Package: Update package dependencies
Version: 1.1.2 - released 2015-07-14
Non-functional
MDLPCNSG-13
Package: Update package dependencies
Version: 1.1.1 - released 2015-07-01
Non-functional
MDLPCNSG-12
Package: Update package dependencies
Version: 1.1.0 - released 2015-06-30
Bug
MDLPCNSG-11
Email connector: From address specification mismatch
Feature
MDLPCNSG-10
Email connector: Send message attachments
Version: 1.0.3 - released 2015-04-20
Non-functional
MDLPCNSG-9
Package: Update package dependencies
Version: 1.0.2 - released 2015-02-23
Non-functional
MDLPCNSG-8
Package: Update package dependencies
Non-functional
MDLPCNSG-7
Package: Update eslint configuration, test.js runner and dev dependencies
Version: 1.0.1 - released 2015-02-03
Bug
MDLPCNSG-6
Email connector: Email subject line not set
Version: 1.0.0 - released 2015-02-03
Feature
MDLPCNSG-5
Email connector: Add sendgrid filters passthrough from datasource
Feature
MDLPCNSG-4
Email connector: Add sendgrid options passthrough from datasource
Version: 0.1.1 - released 2015-02-03
Non-functional
MDLPCNSG-3
Package: Update package dependencies
Version: 0.1.0 - released 2015-02-02
Feature
MDLPCNSG-2
Email connector: Add an loopback connector for sending emails from SendGrid
MIT License (MIT). All rights not explicitly granted in the license are reserved.
Copyright (c) 2015 John Barry
[email protected] - "MIT License (MIT)",
documented by npm-licenses .