0.3.3 • Published 7 years ago

sendhtmlmail v0.3.3

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

sendhtmlmail Node module

Small script with configuration to send mail using Nodemailer.

Usage

Install with npm

npm install sendhtmlmail

Command line

sendhtmlmail -f /path/to/file.html
sendhtmlmail --file=/path/to/file.html

Require in your script

var sendmail = require('sendhtmlmail');
sendmail({file:'/path/to/file.html'});

Configurations

The script look for sendhtmlmail.conf file at /executionpath/conf folder. Look for sample conf in node_modules/sendhtmlmail/conf/sendhtmlmail_conf.sample.json.

Is also possible to specify an alternative configuration file using conf parameter

sendhtmlmail -f /path/to/file.html -c /path/to/conf-file.json
sendhtmlmail --file=/path/to/file.html -conf=/path/to/conf-file.json

in you script

sendmail({file:'/path/to/file.html', conf:/path/to/conf-file.json});
  • from - The e-mail address of the sender. All e-mail addresses can be plain 'sender@server.com' or formatted '"Sender Name" <sender@server.com>', see Nodemailer documentations for details
  • to - Comma separated list or an array of recipients e-mail addresses. For now hardcoded for the Bcc: field
  • smtpConfig - Nodemailer SMTP trasport settiings
  • imageBaseURL - Base URL for not embedded images
  • embedCIDDomain - Domain used creating CID path for emebedded images
  • imageFolder - Base path for images inside html. Final path to image file on disk is calculated starting from file property.
  • useImages - In script use override prompt value. If "N" images and CSS url() are stripped from the code. If not specified default value is "Y".
  • embedImages : In script use override prompt value. If "N" images and CSS url() are prefixed with imageBaseURL configuration property. If not specified default value is "Y".
0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago