Last active
November 9, 2017 03:23
-
-
Save aaronthorp/8410571 to your computer and use it in GitHub Desktop.
SMTP via SendGrid using Email package with Meteor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Meteor.isServer) { | |
Meteor.startup(function () { | |
process.env.MAIL_URL = 'smtp://username:[email protected]'; | |
Accounts.emailTemplates.siteName = "My Website Name"; | |
Accounts.emailTemplates.from = "My Website Name <[email protected]>"; | |
Accounts.emailTemplates.resetPassword.subject = function(user) { | |
return "How to reset your password for My Website Name"; | |
}; | |
Email.send({ | |
from: "My Website Name <[email protected]>", | |
to: "[email protected]", | |
subject: "[email protected] | You have received a reply to your enquiry", | |
html: "Here is <b>some</b> text!" | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOTE the username/password could be different than your account, I create separate user (with Mail checked), you can do it here: https://app.sendgrid.com/settings/credentials