Ok, Looks like test API key won't get any messages recorded. I created a new API key (not test) - and it worked =]
Cheers
سؤال
I am trying to send an email using Mandrill API using "messages/send-template" request in return I receive the following response:
[
{
email: "test@email.com",
status: "sent",
_id: "8ff773d1c683434891cee94e461e53e7",
reject_reason: null
}
]
but when i try to execute "messages/info" request I get an error
Mandrill_Unknown_Message: No message exists with the id '8ff773d1c683434891cee94e461e53e7'
I use the following code for those actions:
$message_data = array(
'text' => '123',
'from_email' => 'sender@email.com',
'to' => array(
array('email' => 'test@email.com')
),
);
try {
$md_message = $this->_mandrill->messages->send($message_data);
foreach($md_message as $message) {
if($message['status'] != 'sent') {
trigger_error("Internal Error (Mandrill): ".$message['reject_reason']);
return false;
}
$info = $this->_mandrill->messages->info($message['_id']);
}
return true;
} catch (Exception $m) {
trigger_error("Internal Error (Mandrill): ".$m->getMessage());
return false;
}
Also the message doesn't appear in the control panel at Mandrill
المحلول
Ok, Looks like test API key won't get any messages recorded. I created a new API key (not test) - and it worked =]
Cheers