diff --git a/endpoints/cronjobs/sendnotifications.php b/endpoints/cronjobs/sendnotifications.php index 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"] ?? "wallos@wallosapp.com"; + $fromEmail = $row["from_email"] ? $row["from_email"] : "wallos@wallosapp.com"; } 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.php index 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"] ?? "wallos@wallosapp.com"; + $fromEmail = $data["fromemail"] ? $data['fromemail'] : "wallos@wallosapp.com"; $mail = new PHPMailer(true); $mail->CharSet="UTF-8";