Update smtp.js

added the ability for smtp appender to send message as html instead of plaintext. in your log4js.config file simply include "html": "true", to write out as html, otherwise it will send plaintext
master
sc2bigjoe 10 years ago
parent ec5f4485f8
commit 1629e01df9

@ -34,9 +34,15 @@ function smtpAppender(config, layout) {
var msg = {
to: config.recipients,
subject: config.subject || subjectLayout(firstEvent),
text: body,
headers: { "Hostname": os.hostname() }
};
if (!config.html) {
msg.text = body;
} else {
msg.html = body;
}
if (config.sender) {
msg.from = config.sender;
}

Loading…
Cancel
Save