Skip to content

mailing_domains ​

php
array mailing_domains( number|array $shipmentId [, $domainsGroup=false [, $type=false]] )

By default, returns sent, bounce, open, click and unsubscribe counts by recipient domain for mailing $shipmentId (or multiple mailings if an array is provided). If $domainsGroup is provided, groups the data by domain. Use $type to specify the desired data types. Available types:

  • sent - number of sent messages
  • bounced - number of bounces
  • opened - number of opens
  • clicked - number of clicks
  • optedout - number of unsubscribes

Example:

php
print_r(mailing_domains(4));

Result:

Array
 (
     [sare.pl] => Array
         (
             [0] => 2
             [1] => 0
             [2] => 1
             [3] => 0
             [4] => 0
         )

     [example.com] => Array
         (
             [0] => 1
             [1] => 0
             [2] => 0
             [3] => 0
             [4] => 0
         )

 )