I am using mandrill for transactional mails.
I want to get the list of mails which i sent as a batch.
I am using php api call
i am sending like this
'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'
),
),
since mandrill gives unique id as output for each individual mail , like this
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 ))
How can i get info of emails sent as a batch?
like if there is an unique id for an api call, i can track using that.
I thought of using unique tags for each set of batchs, but since only 20 tags are allowed in free version, i tried to use metatag.
'metadata'=> array('unique_id'=> 45829),
but then when i tried a search using meta tag
$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);
I get an empty array as result;
so what should i do to get information of each batch api call.
thanks in advance,
Mahesh EU