Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.
Fix email encoding. Fix email from field
ellite4e7a526e34d2
diff --git a/endpoints/cronjobs/sendnotifications.php b/endpoints/cronjobs/sendnotifications.phpindex 719a3d4..d33a969 100644--- a/endpoints/cronjobs/sendnotifications.php+++ b/endpoints/cronjobs/sendnotifications.php@@ -16,7 +16,7 @@$smtpPort = $row["smtp_port"];$smtpUsername = $row["smtp_username"];$smtpPassword = $row["smtp_password"];- $fromEmail = $row["from_email"] ?? "[email protected]";+ $fromEmail = $row["from_email"] ? $row["from_email"] : "[email protected]";} else {echo "Notifications are disabled. No need to run.";}@@ -57,6 +57,7 @@}$mail = new PHPMailer(true);+ $mail->CharSet="UTF-8";$mail->isSMTP();$mail->Host = $smtpAddress;diff --git a/endpoints/notifications/sendtestmail.php b/endpoints/notifications/sendtestmail.phpindex 60a1b7d..009ca48 100644--- a/endpoints/notifications/sendtestmail.php+++ b/endpoints/notifications/sendtestmail.php@@ -31,7 +31,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {$smtpPort = $data["smtpport"];$smtpUsername = $data["smtpusername"];$smtpPassword = $data["smtppassword"];- $fromEmail = $data["fromemail"] ?? "[email protected]";+ $fromEmail = $data["fromemail"] ? $data['fromemail'] : "[email protected]";$mail = new PHPMailer(true);$mail->CharSet="UTF-8";