'Relevant Reflex ', 'To' => $toEmail, 'Subject' => 'Postmark Test - Relevant Reflex', 'HtmlBody' => '

Postmark is working!

This is a test email from Relevant Reflex via Postmark.

', 'TextBody' => 'Postmark is working! This is a test email from Relevant Reflex via Postmark.', 'ReplyTo' => 'support@relevantreflex.com', 'MessageStream' => 'outbound', 'Tag' => 'test', 'TrackOpens' => true, 'TrackLinks' => 'None' ]; $ch = curl_init('https://api.postmarkapp.com/email'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($payload), CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Accept: application/json', 'Content-Type: application/json', 'X-Postmark-Server-Token: ' . $postmarkApiKey ], CURLOPT_TIMEOUT => 30, CURLOPT_SSL_VERIFYPEER => true ]); $response = curl_exec($ch); $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $data = json_decode($response, true); echo "
";
echo "HTTP Status: $statusCode\n";
echo "Response: " . print_r($data, true);
echo "
"; if ($statusCode === 200 && isset($data['ErrorCode']) && $data['ErrorCode'] === 0) { echo "

SUCCESS — Email sent via Postmark! Check your Gmail.

"; } else { echo "

FAILED — Check the response above.

"; } ?>