smtp: add notify_email field; fix admin notification sent to no-reply sender

This commit is contained in:
Pontoporeia
2026-04-30 12:19:33 +02:00
parent bdb68479d5
commit 33987c9b15
7 changed files with 81 additions and 42 deletions

View File

@@ -188,9 +188,9 @@ try {
);
$plain = htmlToPlain($body);
$settings = SmtpRelay::getSettings($db);
if (!empty($settings['from_email'])) {
SmtpRelay::send($db, $settings['from_email'], $subject, $body, $plain);
$notifyEmail = SmtpRelay::getNotifyEmail($db);
if ($notifyEmail !== '') {
SmtpRelay::send($db, $notifyEmail, $subject, $body, $plain);
}
http_response_code(200);