mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-23 15:40:25 -06:00
smtp without username password
This commit is contained in:
parent
edbab8163e
commit
0f1a95fde9
@ -135,15 +135,20 @@ class Notification {
|
||||
|
||||
static async smtp(notification, msg) {
|
||||
|
||||
let transporter = nodemailer.createTransport({
|
||||
let data = {
|
||||
host: notification.smtpHost,
|
||||
port: notification.smtpPort,
|
||||
secure: notification.smtpSecure,
|
||||
auth: {
|
||||
};
|
||||
|
||||
if (notification.smtpUsername) {
|
||||
data.auth = {
|
||||
user: notification.smtpUsername,
|
||||
pass: notification.smtpPassword,
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
let transporter = nodemailer.createTransport(data);
|
||||
|
||||
// send mail with defined transport object
|
||||
let info = await transporter.sendMail({
|
||||
|
Loading…
Reference in New Issue
Block a user