json - Mailgun stats don't add up -
i'm trying make sense of mailgun stats returned api, , numbers don't add up.
i'm making following call
$stats = $mg->get('example.com/stats/total', array( 'event' => array('accepted', 'delivered', 'failed', 'stored'), 'duration' => '1m', "resolution" => "month" ));
and result (re-formatted json easier reading)
{ 'accepted' : { 'incoming' : 200, 'outgoing' : 458, 'total' : 658 }, 'delivered' : { 'smtp' : 399, 'http' : 0, 'total' : 399 }, 'failed' : { 'temporary' : { 'espblock' : 0 }, 'permanent' : { 'suppress-bounce' : 0, 'suppress-unsubscribe' : 0, 'suppress-complaint' : 0, 'bounce' : 0, 'total' : 0 } }, 'stored' : { 'total' : 0 } }
now, don't understand this: shouldn't sum of delivered messages + failed messages + stored messages greater or equal number of accepted outgoing messages? in example quit lower, , doesn't seem make sense me.
i appreciate thoughts on this.
normally, accepted outgoing messages equal sum of delivered messages + bounces messages.
try using date (something start/end) rather duration/resolution.
that's used in cron, , worked. can go dashboard of mailgun check , compare results
Comments
Post a Comment