sendhtmlmail
v0.3.3
Published
small script with configuration to send mail using nodemailer
Readme
sendhtmlmail Node module
Small script with configuration to send mail using Nodemailer.
Usage
Install with npm
npm install sendhtmlmailCommand line
sendhtmlmail -f /path/to/file.html
sendhtmlmail --file=/path/to/file.htmlRequire 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.jsonin 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
'[email protected]'or formatted'"Sender Name" <[email protected]>', 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
fileproperty. - useImages - In script use override
promptvalue. If"N"images and CSSurl()are stripped from the code. If not specified default value is"Y". - embedImages : In script use override
promptvalue. If"N"images and CSSurl()are prefixed with imageBaseURL configuration property. If not specified default value is"Y".
