Overview

Namespaces

  • None
  • PHP

Classes

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

Exceptions

  • Mandrill_Error
  • Mandrill_HttpError
  • Mandrill_Invalid_DeleteDefaultPool
  • Mandrill_Invalid_DeleteNonEmptyPool
  • Mandrill_Invalid_EmptyDefaultPool
  • Mandrill_Invalid_Key
  • Mandrill_Invalid_Reject
  • Mandrill_Invalid_Tag_Name
  • Mandrill_Invalid_Template
  • Mandrill_IP_ProvisionLimit
  • Mandrill_PaymentRequired
  • Mandrill_ServiceUnavailable
  • Mandrill_Unknown_Export
  • Mandrill_Unknown_InboundDomain
  • Mandrill_Unknown_IP
  • Mandrill_Unknown_Message
  • Mandrill_Unknown_Pool
  • Mandrill_Unknown_Sender
  • Mandrill_Unknown_Subaccount
  • Mandrill_Unknown_Template
  • Mandrill_Unknown_Url
  • Mandrill_Unknown_Webhook
  • Mandrill_ValidationError
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: class Mandrill_Whitelists {
 4:     public function __construct(Mandrill $master) {
 5:         $this->master = $master;
 6:     }
 7: 
 8:     /**
 9:      * Adds an email to your email rejection whitelist. If the address is
10: currently on your blacklist, that blacklist entry will be removed
11: automatically.
12:      * @param string $email an email address to add to the whitelist
13:      * @return struct a status object containing the address and the result of the operation
14:      *     - email string the email address you provided
15:      *     - whether boolean the operation succeeded
16:      */
17:     public function add($email) {
18:         $_params = array("email" => $email);
19:         return $this->master->call('whitelists/add', $_params);
20:     }
21: 
22:     /**
23:      * Retrieves your email rejection whitelist. You can provide an email
24: address or search prefix to limit the results. Returns up to 1000 results.
25:      * @param string $email an optional email address or prefix to search by
26:      * @return array up to 1000 whitelist entries
27:      *     - return[] struct the information for each whitelist entry
28:      *         - email string the email that is whitelisted
29:      *         - detail string a description of why the email was whitelisted
30:      *         - created_at string when the email was added to the whitelist
31:      */
32:     public function getList($email=null) {
33:         $_params = array("email" => $email);
34:         return $this->master->call('whitelists/list', $_params);
35:     }
36: 
37:     /**
38:      * Removes an email address from the whitelist.
39:      * @param string $email the email address to remove from the whitelist
40:      * @return struct a status object containing the address and whether the deletion succeeded
41:      *     - email string the email address that was removed from the blacklist
42:      *     - deleted boolean whether the address was deleted successfully
43:      */
44:     public function delete($email) {
45:         $_params = array("email" => $email);
46:         return $this->master->call('whitelists/delete', $_params);
47:     }
48: 
49: }
50: 
51: 
52: 
API documentation generated by ApiGen 2.8.0