Skip to content

Instantly share code, notes, and snippets.

@aaronthorp
Last active November 9, 2017 03:23
Show Gist options
  • Save aaronthorp/8410571 to your computer and use it in GitHub Desktop.
Save aaronthorp/8410571 to your computer and use it in GitHub Desktop.

Revisions

  1. aaronthorp revised this gist Jan 14, 2014. 1 changed file with 19 additions and 15 deletions.
    34 changes: 19 additions & 15 deletions mail-sendgrid.js
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,22 @@
    Meteor.startup(function () {
    if (Meteor.isServer) {

    process.env.MAIL_URL = 'smtp://username:[email protected]';
    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!"
    });

    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!"
    });

    });
    }
  2. aaronthorp created this gist Jan 14, 2014.
    18 changes: 18 additions & 0 deletions mail-sendgrid.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    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!"
    });

    });