Overview

Namespaces

  • None
  • PHP

Classes

  • Mandrill
  • Mandrill_Exports
  • Mandrill_Inbound
  • Mandrill_Internal
  • Mandrill_Messages
  • Mandrill_Rejects
  • Mandrill_Senders
  • Mandrill_Tags
  • Mandrill_Templates
  • Mandrill_Urls
  • Mandrill_Users
  • Mandrill_Webhooks
  • Mandrill_Whitelists

Exceptions

  • Mandrill_Error
  • Mandrill_HttpError
  • Mandrill_Invalid_Key
  • Mandrill_Invalid_Reject
  • Mandrill_Invalid_Tag_Name
  • Mandrill_Invalid_Template
  • Mandrill_ServiceUnavailable
  • Mandrill_Unknown_Export
  • Mandrill_Unknown_InboundDomain
  • Mandrill_Unknown_Sender
  • Mandrill_Unknown_Template
  • Mandrill_Unknown_Url
  • Mandrill_Unknown_Webhook
  • Mandrill_ValidationError
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: class Mandrill_Senders {
  4:     public function __construct(Mandrill $master) {
  5:         $this->master = $master;
  6:     }
  7: 
  8:     /**
  9:      * Return the senders that have tried to use this account.
 10:      * @return array an array of sender data, one for each sending addresses used by the account
 11:      *     - return[] struct the information on each sending address in the account
 12:      *         - address string the sender's email address
 13:      *         - created_at string the date and time that the sender was first seen by Mandrill as a UTC date string in YYYY-MM-DD HH:MM:SS format
 14:      *         - sent integer the total number of messages sent by this sender
 15:      *         - hard_bounces integer the total number of hard bounces by messages by this sender
 16:      *         - soft_bounces integer the total number of soft bounces by messages by this sender
 17:      *         - rejects integer the total number of rejected messages by this sender
 18:      *         - complaints integer the total number of spam complaints received for messages by this sender
 19:      *         - unsubs integer the total number of unsubscribe requests received for messages by this sender
 20:      *         - opens integer the total number of times messages by this sender have been opened
 21:      *         - clicks integer the total number of times tracked URLs in messages by this sender have been clicked
 22:      */
 23:     public function getList() {
 24:         $_params = array();
 25:         return $this->master->call('senders/list', $_params);
 26:     }
 27: 
 28:     /**
 29:      * Returns the sender domains that have been added to this account.
 30:      * @return array an array of sender domain data, one for each sending domain used by the account
 31:      *     - return[] struct the information on each sending domain for the account
 32:      *         - domain string the sender domain name
 33:      *         - created_at string the date and time that the sending domain was first seen as a UTC string in YYYY-MM-DD HH:MM:SS format
 34:      */
 35:     public function domains() {
 36:         $_params = array();
 37:         return $this->master->call('senders/domains', $_params);
 38:     }
 39: 
 40:     /**
 41:      * Return more detailed information about a single sender, including aggregates of recent stats
 42:      * @param string $address the email address of the sender
 43:      * @return struct the detailed information on the sender
 44:      *     - address string the sender's email address
 45:      *     - created_at string the date and time that the sender was first seen by Mandrill as a UTC date string in YYYY-MM-DD HH:MM:SS format
 46:      *     - sent integer the total number of messages sent by this sender
 47:      *     - hard_bounces integer the total number of hard bounces by messages by this sender
 48:      *     - soft_bounces integer the total number of soft bounces by messages by this sender
 49:      *     - rejects integer the total number of rejected messages by this sender
 50:      *     - complaints integer the total number of spam complaints received for messages by this sender
 51:      *     - unsubs integer the total number of unsubscribe requests received for messages by this sender
 52:      *     - opens integer the total number of times messages by this sender have been opened
 53:      *     - clicks integer the total number of times tracked URLs in messages by this sender have been clicked
 54:      *     - stats struct an aggregate summary of the sender's sending stats
 55:      *         - today struct stats for this sender so far today
 56:      *             - sent integer the number of emails sent for this sender so far today
 57:      *             - hard_bounces integer the number of emails hard bounced for this sender so far today
 58:      *             - soft_bounces integer the number of emails soft bounced for this sender so far today
 59:      *             - rejects integer the number of emails rejected for sending this sender so far today
 60:      *             - complaints integer the number of spam complaints for this sender so far today
 61:      *             - unsubs integer the number of unsubscribes for this sender so far today
 62:      *             - opens integer the number of times emails have been opened for this sender so far today
 63:      *             - unique_opens integer the number of unique opens for emails sent for this sender so far today
 64:      *             - clicks integer the number of URLs that have been clicked for this sender so far today
 65:      *             - unique_clicks integer the number of unique clicks for emails sent for this sender so far today
 66:      *         - last_7_days struct stats for this sender in the last 7 days
 67:      *             - sent integer the number of emails sent for this sender in the last 7 days
 68:      *             - hard_bounces integer the number of emails hard bounced for this sender in the last 7 days
 69:      *             - soft_bounces integer the number of emails soft bounced for this sender in the last 7 days
 70:      *             - rejects integer the number of emails rejected for sending this sender in the last 7 days
 71:      *             - complaints integer the number of spam complaints for this sender in the last 7 days
 72:      *             - unsubs integer the number of unsubscribes for this sender in the last 7 days
 73:      *             - opens integer the number of times emails have been opened for this sender in the last 7 days
 74:      *             - unique_opens integer the number of unique opens for emails sent for this sender in the last 7 days
 75:      *             - clicks integer the number of URLs that have been clicked for this sender in the last 7 days
 76:      *             - unique_clicks integer the number of unique clicks for emails sent for this sender in the last 7 days
 77:      *         - last_30_days struct stats for this sender in the last 30 days
 78:      *             - sent integer the number of emails sent for this sender in the last 30 days
 79:      *             - hard_bounces integer the number of emails hard bounced for this sender in the last 30 days
 80:      *             - soft_bounces integer the number of emails soft bounced for this sender in the last 30 days
 81:      *             - rejects integer the number of emails rejected for sending this sender in the last 30 days
 82:      *             - complaints integer the number of spam complaints for this sender in the last 30 days
 83:      *             - unsubs integer the number of unsubscribes for this sender in the last 30 days
 84:      *             - opens integer the number of times emails have been opened for this sender in the last 30 days
 85:      *             - unique_opens integer the number of unique opens for emails sent for this sender in the last 30 days
 86:      *             - clicks integer the number of URLs that have been clicked for this sender in the last 30 days
 87:      *             - unique_clicks integer the number of unique clicks for emails sent for this sender in the last 30 days
 88:      *         - last_60_days struct stats for this sender in the last 60 days
 89:      *             - sent integer the number of emails sent for this sender in the last 60 days
 90:      *             - hard_bounces integer the number of emails hard bounced for this sender in the last 60 days
 91:      *             - soft_bounces integer the number of emails soft bounced for this sender in the last 60 days
 92:      *             - rejects integer the number of emails rejected for sending this sender in the last 60 days
 93:      *             - complaints integer the number of spam complaints for this sender in the last 60 days
 94:      *             - unsubs integer the number of unsubscribes for this sender in the last 60 days
 95:      *             - opens integer the number of times emails have been opened for this sender in the last 60 days
 96:      *             - unique_opens integer the number of unique opens for emails sent for this sender in the last 60 days
 97:      *             - clicks integer the number of URLs that have been clicked for this sender in the last 60 days
 98:      *             - unique_clicks integer the number of unique clicks for emails sent for this sender in the last 60 days
 99:      *         - last_90_days struct stats for this sender in the last 90 days
100:      *             - sent integer the number of emails sent for this sender in the last 90 days
101:      *             - hard_bounces integer the number of emails hard bounced for this sender in the last 90 days
102:      *             - soft_bounces integer the number of emails soft bounced for this sender in the last 90 days
103:      *             - rejects integer the number of emails rejected for sending this sender in the last 90 days
104:      *             - complaints integer the number of spam complaints for this sender in the last 90 days
105:      *             - unsubs integer the number of unsubscribes for this sender in the last 90 days
106:      *             - opens integer the number of times emails have been opened for this sender in the last 90 days
107:      *             - unique_opens integer the number of unique opens for emails sent for this sender in the last 90 days
108:      *             - clicks integer the number of URLs that have been clicked for this sender in the last 90 days
109:      *             - unique_clicks integer the number of unique clicks for emails sent for this sender in the last 90 days
110:      */
111:     public function info($address) {
112:         $_params = array("address" => $address);
113:         return $this->master->call('senders/info', $_params);
114:     }
115: 
116:     /**
117:      * Return the recent history (hourly stats for the last 30 days) for a sender
118:      * @param string $address the email address of the sender
119:      * @return array the array of history information
120:      *     - return[] struct the stats for a single hour
121:      *         - time string the hour as a UTC date string in YYYY-MM-DD HH:MM:SS format
122:      *         - sent integer the number of emails that were sent during the hour
123:      *         - hard_bounces integer the number of emails that hard bounced during the hour
124:      *         - soft_bounces integer the number of emails that soft bounced during the hour
125:      *         - rejects integer the number of emails that were rejected during the hour
126:      *         - complaints integer the number of spam complaints received during the hour
127:      *         - opens integer the number of emails opened during the hour
128:      *         - unique_opens integer the number of unique opens generated by messages sent during the hour
129:      *         - clicks integer the number of tracked URLs clicked during the hour
130:      *         - unique_clicks integer the number of unique clicks generated by messages sent during the hour
131:      */
132:     public function timeSeries($address) {
133:         $_params = array("address" => $address);
134:         return $this->master->call('senders/time-series', $_params);
135:     }
136: 
137: }
138: 
139: 
140: 
API documentation generated by ApiGen 2.8.0