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
This commit is contained in:
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…
Reference in New Issue
Block a user