Fix CyberMail from field — use separate from/from_name fields (API rejects Name <email> format)

This commit is contained in:
2026-06-14 15:40:35 +00:00
parent 66cbd3f0d3
commit 602bc77cdd
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -336,7 +336,7 @@ function sendEmail($to, $subject, $htmlContent, $textContent = '') {
error_log('[TJJ sendEmail] CYBERMAIL_API_KEY not configured');
return false;
}
$payload = ['from' => $fromName . ' <' . $from . '>', 'to' => $to, 'subject' => $subject, 'html' => $htmlContent];
$payload = ['from' => $from, 'from_name' => $fromName, '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, [