Update how to use sendgrid
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// EmailService.js
|
||||
var sendgrid = require("sendgrid");
|
||||
var sendgrid = require("sendgrid")(sails.config.email.apiKey);
|
||||
var thenJade = require("then-jade");
|
||||
|
||||
exports.sendOrderEmail = function(inviteeData) {
|
||||
@@ -29,8 +29,7 @@ exports.sendOrderEmail = function(inviteeData) {
|
||||
|
||||
options.html = result;
|
||||
|
||||
var sg = sendgrid(sails.config.email.apiUser, sails.config.email.apiKey);
|
||||
sg.send(options, function(err, response) {
|
||||
sendgrid.send(options, function(err, response) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user