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

This commit is contained in:
2026-05-29 18:58:35 +00:00
parent 76bf967bd0
commit 4f096047b6
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -336,8 +336,7 @@ function sendEmail($to, $subject, $htmlContent, $textContent = '') {
error_log('[TJJ sendEmail] CYBERMAIL_API_KEY not configured');
return false;
}
$payload = ['from' => ['email' => $from, 'name' => $fromName],
'to' => [['email' => $to]], 'subject' => $subject, 'html' => $htmlContent];
$payload = ['from' => $from, 'to' => $to, 'subject' => $subject, 'html' => $htmlContent];
if ($textContent) $payload['text'] = $textContent;
$ch = curl_init('https://platform.cyberpersons.com/email/v1/send');
curl_setopt_array($ch, [