Skip to content

Commit

Permalink
Update nodemailer API usage in contact controller
Browse files Browse the repository at this point in the history
  • Loading branch information
sahat committed Jul 15, 2014
1 parent 5d5a882 commit ae3dc2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/contact.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var secrets = require('../config/secrets');
var nodemailer = require("nodemailer");
var smtpTransport = nodemailer.createTransport('SMTP', {
var transporter = nodemailer.createTransport({
service: 'SendGrid',
auth: {
user: secrets.sendgrid.user,
Expand Down Expand Up @@ -52,7 +52,7 @@ exports.postContact = function(req, res) {
text: body
};

smtpTransport.sendMail(mailOptions, function(err) {
transporter.sendMail(mailOptions, function(err) {
if (err) {
req.flash('errors', { msg: err.message });
return res.redirect('/contact');
Expand Down

0 comments on commit ae3dc2b

Please sign in to comment.