Fix CyberMail payload format: flat string for from/to fields

This commit is contained in:
2026-05-29 19:01:56 +00:00
parent 53b314736d
commit 5e639b439a
+2 -2
View File
@@ -65,8 +65,8 @@ function sendEmail(string $to, string $toName, string $subject, string $html): b
$apiKey = defined('CYBERMAIL_API_KEY') ? CYBERMAIL_API_KEY : '';
if (!$apiKey || strpos($apiKey, 'YOUR_KEY') !== false) return false;
$payload = json_encode([
'from' => ['email' => MAIL_FROM, 'name' => MAIL_FROM_NAME],
'to' => [['email' => $to, 'name' => $toName]],
'from' => MAIL_FROM,
'to' => $to,
'subject' => $subject,
'html' => $html,
]);