improve smtp with cc, bbc and ignore tls

This commit is contained in:
LouisLam
2021-09-09 01:13:09 +08:00
parent 6006038689
commit dd283423ab
3 changed files with 93 additions and 54 deletions

View File

@@ -30,10 +30,15 @@ class SMTP extends NotificationProvider {
// send mail with defined transport object
await transporter.sendMail({
from: `"Uptime Kuma" <${notification.smtpFrom}>`,
from: notification.smtpFrom,
cc: notification.smtpCC,
bcc: notification.smtpBCC,
to: notification.smtpTo,
subject: msg,
text: bodyTextContent,
tls: {
rejectUnauthorized: notification.smtpIgnoreTLSError || false,
},
});
return "Sent Successfully.";