1

我正在使用 mandrill 处理交易邮件。

我想获取我作为批次发送的邮件列表。

我正在使用 php api 调用我这样发送

'to' => array(
        array(
            'email' => 'recipient.email@example.com',
            'name' => 'Recipient Name',
            'type' => 'to'
        ),
   array(
            'email' => 'recipient2.email@example.com',
            'name' => 'Recipient Name',
            'type' => 'to'
        ),
   array(
            'email' => 'recipient3.email@example.com',
            'name' => 'Recipient Name',
            'type' => 'to'
        ),
    ),

因为 mandrill 为每个单独的邮件提供唯一的 id 作为输出,就像这样

Array ( [0] => Array ( [email] => recipient.email@example.com [status] => sent [_id] => 08186625130043798e2a0c18ff4781fd1 [reject_reason] => ) [1] => Array ( [email] => recipient2.email@example.com [status] => rejected [_id] => a5d9e07963f924fb48c316f70997ca168 [reject_reason] => soft-bounce ))

如何获取批量发送的电子邮件信息?

就像一个 api 调用有一个唯一的 id,我可以使用它来跟踪。

我想为每组批次使用唯一标签,但由于免费版本只允许使用 20 个标签,我尝试使用元标签。

'metadata'=> array('unique_id'=> 45829),

但是当我尝试使用元标记进行搜索时

$query = 'u_unique_id = 45829';
    $date_from = '2000-6-10';
    $date_to = date('Y-m-d');
    $senders = array('recipeient1@gmail.com');
    $tags=array();
    $limit = 1000;
    $result = $mandrill->messages->search($query, $date_from, $date_to, $tags, $senders);
print_r($result);

结果我得到一个空数组;

那么我应该怎么做才能获取每个批处理 api 调用的信息。

提前致谢,

马赫什欧盟

4

0 回答 0