Update how to use sendgrid

This commit is contained in:
Ben Ramey
2016-02-05 08:00:04 -06:00
parent 5a9357ba76
commit dab5097730
2 changed files with 3 additions and 4 deletions

View File

@@ -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 {

View File

@@ -3,6 +3,6 @@
//
module.exports.email = {
apiUser: "benjaminramey",
apiKey: "AVidasUPthub6pY3fFGe",
apiKey: "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",
fromAddress: "no-reply@lunchrun.me"
};