mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
Fix CyberMail payload format: use flat string for from/to fields
This commit is contained in:
+2
-2
@@ -58,8 +58,8 @@ class Email {
|
||||
|
||||
public function send(string $to, string $subject, string $html, ?string $text = null, array $options = []): array {
|
||||
$payload = array_merge([
|
||||
'from' => ['email' => $this->fromEmail, 'name' => getSetting('cybermail_from_name', "Tom's Java Jive")],
|
||||
'to' => [['email' => $to]],
|
||||
'from' => $this->fromEmail,
|
||||
'to' => $to,
|
||||
'subject' => $subject,
|
||||
'html' => $html,
|
||||
], $options);
|
||||
|
||||
@@ -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, [
|
||||
|
||||
Reference in New Issue
Block a user