Added option to set From email on smtp settings

This commit is contained in:
ellite
2023-11-17 00:39:14 +01:00
parent c70859e1b0
commit 0b6246b09d
8 changed files with 35 additions and 8 deletions
+2 -1
View File
@@ -16,6 +16,7 @@
$smtpPort = $row["smtp_port"];
$smtpUsername = $row["smtp_username"];
$smtpPassword = $row["smtp_password"];
$fromEmail = $row["fromEmail"] ?? "wallos@wallosapp.com";
} else {
echo "Notifications are disabled. No need to run.";
}
@@ -70,7 +71,7 @@
$email = $user['email'];
$name = $user['username'];
$mail->setFrom('wallos@wallosapp.com', 'Wallos App');
$mail->setFrom($fromEmail, 'Wallos App');
$mail->addAddress($email, $name);
$mail->Subject = 'Wallos Notification';