Php Mandrill消息未注册,但状态已发送

Php Mandrill消息未注册,但状态已发送,php,api,mandrill,Php,Api,Mandrill,我正在尝试使用“消息/发送模板”请求使用Mandrill API发送电子邮件 作为回报,我收到以下答复: [ { email: "test@email.com", status: "sent", _id: "8ff773d1c683434891cee94e461e53e7", reject_reason: null } ] 但是当我尝试执行“messages/info”请求时,我得到了一个错误 Mandrill_U

我正在尝试使用“消息/发送模板”请求使用Mandrill API发送电子邮件 作为回报,我收到以下答复:

[
    {
        email: "test@email.com",
        status: "sent",
        _id: "8ff773d1c683434891cee94e461e53e7",
        reject_reason: null
    }
]
但是当我尝试执行“messages/info”请求时,我得到了一个错误

Mandrill_Unknown_Message: No message exists with the id '8ff773d1c683434891cee94e461e53e7' 
我使用以下代码执行这些操作:

$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;
}

此外,Mandrill的控制面板中也没有显示该消息,似乎test API key不会记录任何消息。 我创建了一个新的API密钥(不是测试),它工作了=]


干杯

好的,看来测试API密钥不会记录任何消息。 我创建了一个新的API密钥(不是测试),它工作了=]

干杯