Skip to content

Instantly share code, notes, and snippets.

@facultymatt
Last active December 23, 2015 06:19

Revisions

  1. facultymatt revised this gist Sep 18, 2013. 1 changed file with 10 additions and 7 deletions.
    17 changes: 10 additions & 7 deletions email_best_practices.md
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,16 @@

    # Good Looking Approaches

    ## NodeMailer (current best pick)

    https://github.com/andris9/Nodemailer

    - More robust and developed than Notifier.
    - Does it support sendGrid (yes) [thorugh smtp](https://github.com/andris9/Nodemailer#sendgrid-support).
    - Lots of examples
    - Easy rich html emails, using https://github.com/niftylettuce/node-email-templates
    - Easy attachments

    ## Node Notifier

    https://github.com/madhums/node-notifier
    @@ -25,13 +35,6 @@ And notifier checks for the default email client, sets the template and options,

    It assumes you have a matching template for `comment` living in `/templates`, see [example](https://github.com/madhums/node-notifier/tree/master/test/templates), but you can easily set `config.tplPath` or override the template function alltogether.

    ## NodeMailer

    https://github.com/andris9/Nodemailer

    - More robust and developed than Notifier.
    - Does it support sendGrid (yes) [thorugh smtp](https://github.com/andris9/Nodemailer#sendgrid-support).
    - Lots of examples

    ## Drywall.io Mail Setup

  2. facultymatt revised this gist Sep 17, 2013. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions email_best_practices.md
    Original file line number Diff line number Diff line change
    @@ -29,8 +29,9 @@ It assumes you have a matching template for `comment` living in `/templates`, se

    https://github.com/andris9/Nodemailer

    More robust and developed than Notifier. Does it support sendGrid (yes) [thorugh smtp](https://github.com/andris9/Nodemailer#well-known-services-for-smtp). What protocol does it use on Heroku?

    - More robust and developed than Notifier.
    - Does it support sendGrid (yes) [thorugh smtp](https://github.com/andris9/Nodemailer#sendgrid-support).
    - Lots of examples

    ## Drywall.io Mail Setup

  3. facultymatt revised this gist Sep 17, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions email_best_practices.md
    Original file line number Diff line number Diff line change
    @@ -23,13 +23,13 @@ notifier.send('comment', options, function (err) {

    And notifier checks for the default email client, sets the template and options, handles environment settings such as disabling sending in development mode, and then sends the email.

    It assumes you have a matching template for `comment` living in `/templates`, see [https://github.com/madhums/node-notifier/tree/master/test/templates](example), but you can easily set `config.tplPath` or override the template function alltogether.
    It assumes you have a matching template for `comment` living in `/templates`, see [example](https://github.com/madhums/node-notifier/tree/master/test/templates), but you can easily set `config.tplPath` or override the template function alltogether.

    ## NodeMailer

    https://github.com/andris9/Nodemailer

    More robust and developed than Notifier. Does it support sendGrid (yes) [https://github.com/andris9/Nodemailer#well-known-services-for-smtp](thorugh smtp). What protocol does it use on Heroku?
    More robust and developed than Notifier. Does it support sendGrid (yes) [thorugh smtp](https://github.com/andris9/Nodemailer#well-known-services-for-smtp). What protocol does it use on Heroku?


    ## Drywall.io Mail Setup
  4. facultymatt revised this gist Sep 17, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion email_best_practices.md
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@ It assumes you have a matching template for `comment` living in `/templates`, se

    https://github.com/andris9/Nodemailer

    More robust and developed than Notifier. Does it support sendGrid? What protocol does it use on Heroku?
    More robust and developed than Notifier. Does it support sendGrid (yes) [https://github.com/andris9/Nodemailer#well-known-services-for-smtp](thorugh smtp). What protocol does it use on Heroku?


    ## Drywall.io Mail Setup
  5. facultymatt revised this gist Sep 17, 2013. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions email_best_practices.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    # Best Practices
    # Emailer / Notifier Best Practices

    - Supports any protocol, ideally by just setting a config option or function.
    - Supports `sendgrid`, which is a Heroku based app, making it super simple to get running on develop.
    - Won't fail, or catches errors, if any variables are missing.
    - Checks for development and testing environments, and prevents email send (console.log instead)

    - REUSABLE! The library itself, and maybe even the template, should be resuable across projects.

    # Good Looking Approaches

    @@ -25,10 +25,17 @@ And notifier checks for the default email client, sets the template and options,

    It assumes you have a matching template for `comment` living in `/templates`, see [https://github.com/madhums/node-notifier/tree/master/test/templates](example), but you can easily set `config.tplPath` or override the template function alltogether.

    ## NodeMailer

    https://github.com/andris9/Nodemailer

    More robust and developed than Notifier. Does it support sendGrid? What protocol does it use on Heroku?


    ## Drywall.io Mail Setup

    I find the drywall.io project is a good goto project for learning an reference. While not modular enough to pull the code into our project, its woth looking at how they do it. Similar to notifier I believe.
    https://github.com/jedireza/drywall/blob/master/utilities/sendmail.js



  6. facultymatt revised this gist Sep 17, 2013. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion email_best_practices.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    # Best Practices

    List coming soon
    - Supports any protocol, ideally by just setting a config option or function.
    - Supports `sendgrid`, which is a Heroku based app, making it super simple to get running on develop.
    - Won't fail, or catches errors, if any variables are missing.
    - Checks for development and testing environments, and prevents email send (console.log instead)


    # Good Looking Approaches
  7. facultymatt revised this gist Sep 17, 2013. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions email_best_practices.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,13 @@
    Best Practices
    -------
    # Best Practices

    List coming soon


    Good Looking Approaches
    --------
    # Good Looking Approaches

    **https://github.com/madhums/node-notifier**
    ## Node Notifier

    https://github.com/madhums/node-notifier

    This is from the guy that insipired mean.io's setup. All functionality is self contained - you simply call:

  8. facultymatt renamed this gist Sep 17, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  9. facultymatt created this gist Sep 17, 2013.
    30 changes: 30 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    Best Practices
    -------



    Good Looking Approaches
    --------

    **https://github.com/madhums/node-notifier**

    This is from the guy that insipired mean.io's setup. All functionality is self contained - you simply call:

    ```
    notifier.send('comment', options, function (err) {
    if (err) return console.log(err);
    console.log('Successfully sent Notifiaction!');
    });
    ```

    And notifier checks for the default email client, sets the template and options, handles environment settings such as disabling sending in development mode, and then sends the email.

    It assumes you have a matching template for `comment` living in `/templates`, see [https://github.com/madhums/node-notifier/tree/master/test/templates](example), but you can easily set `config.tplPath` or override the template function alltogether.