Closed andrebruton closed 6 months ago
I'm trying to get feedback when sending email using the code.
$result = $mg->messages()->send('<mg.mydomain.co.za>', [ 'from' => 'from@mydomain.co.za', 'to' => $users_email, 'subject' => $subject, 'replyTo' => 'reply@mydomain.co.za', 'text' => $text, 'html' => $html, 'o:tag' => 'testing', 'v:usersID' => 56789 ]); echo "<pre>"; print_r($result); echo "<pre>"; echo "Result Type: " . gettype($result), "<br>"; echo "<p>2</p>"; $message_id = $result->getId(); echo "ID: " . $message_id . "<br>"; $message_status = $result->getMessage(); echo "Message: " . $message_status . "<br>";
I'm able to get getId() and getMessage(). I'm looking for the status code for the posting. If I get 200 I know it was posted and I can process accordingly. How do I get the return code?
What other information is available to read?
Hello @andrebruton So In the new version we little bit extended response. And from now you can retrieve headers and status code from the response
I'm trying to get feedback when sending email using the code.
I'm able to get getId() and getMessage(). I'm looking for the status code for the posting. If I get 200 I know it was posted and I can process accordingly. How do I get the return code?
What other information is available to read?