8000 Merge pull request #266 from sc2bigjoe/patch-1 · yanxi123-com/log4js-node@a4be20f · GitHub
[go: up one dir, main page]

Skip to content

Commit a4be20f

Browse files
committed
Merge pull request log4js-node#266 from sc2bigjoe/patch-1
Update smtp.js
2 parents d10d40b + 1629e01 commit a4be20f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/appenders/smtp.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,15 @@ function smtpAppender(config, layout) {
3434
var msg = {
3535
to: config.recipients,
3636
subject: config.subject || subjectLayout(firstEvent),
37-
text: body,
3837
headers: { "Hostname": os.hostname() }
3938
};
39+
40+
if (!config.html) {
41+
msg.text = body;
42+
} else {
43+
msg.html = body;
44+
}
45+
4046
if (config.sender) {
4147
msg.from = config.sender;
4248
}

0 commit comments

Comments
 (0)
0