mailsender

    1.1.2 • Public • Published



    Send E-Mail from Node.js with your GMail account to any e-mail recipient.

    Usage explanation

    1. Get a GMail account from Google
    2. Google is somewhat restrictive how you ought to send mails, but there is a way to configure automated sending capabilities.
      Go to
      • "Settings"
      • "Accounts and import"
      • "Further Settings"
      • "Logon and security"
      • Activate "Less secure apps"
    3. Go to your node project folder and type npm install mailsender
    4. Use mailsender in your Node.js applicaton (copy&paste):
          var mailsender = require('mailsender');
          mailsender
              .from('user', 'pass')
              .to('x@y.z')
              .body('subject', 'message')
              .send();
          

    Sending HTML E-Mail

    Instead of
      .body('subject', 'message')
    
    above, add a boolean as last argument:
      .body('subject', 'message', true)
    
    That's it: Your message will be interpreted as HTML now.

    Install

    npm i mailsender

    DownloadsWeekly Downloads

    10

    Version

    1.1.2

    License

    MIT

    Last publish

    Collaborators

    • pein-consulting.de