Overview

Namespaces

  • None
  • PHP

Classes

  • Mandrill
  • Mandrill_Exports
  • Mandrill_Inbound
  • Mandrill_Internal
  • Mandrill_Ips
  • Mandrill_Messages
  • Mandrill_Metadata
  • 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_CustomDNS
  • Mandrill_Invalid_CustomDNSPending
  • 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_Metadata_FieldLimit
  • Mandrill_NoSendingHistory
  • Mandrill_PaymentRequired
  • Mandrill_PoorReputation
  • Mandrill_ServiceUnavailable
  • Mandrill_Unknown_Export
  • Mandrill_Unknown_InboundDomain
  • Mandrill_Unknown_InboundRoute
  • Mandrill_Unknown_IP
  • Mandrill_Unknown_Message
  • Mandrill_Unknown_MetadataField
  • Mandrill_Unknown_Pool
  • Mandrill_Unknown_Sender
  • Mandrill_Unknown_Subaccount
  • Mandrill_Unknown_Template
  • Mandrill_Unknown_TrackingDomain
  • 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:      * @param string $comment an optional description of why the email was whitelisted
14:      * @return struct a status object containing the address and the result of the operation
15:      *     - email string the email address you provided
16:      *     - added boolean whether the operation succeeded
17:      */
18:     public function add($email, $comment=null) {
19:         $_params = array("email" => $email, "comment" => $comment);
20:         return $this->master->call('whitelists/add', $_params);
21:     }
22: 
23:     /**
24:      * Retrieves your email rejection whitelist. You can provide an email
25: address or search prefix to limit the results. Returns up to 1000 results.
26:      * @param string $email an optional email address or prefix to search by
27:      * @return array up to 1000 whitelist entries
28:      *     - return[] struct the information for each whitelist entry
29:      *         - email string the email that is whitelisted
30:      *         - detail string a description of why the email was whitelisted
31:      *         - created_at string when the email was added to the whitelist
32:      */
33:     public function getList($email=null) {
34:         $_params = array("email" => $email);
35:         return $this->master->call('whitelists/list', $_params);
36:     }
37: 
38:     /**
39:      * Removes an email address from the whitelist.
40:      * @param string $email the email address to remove from the whitelist
41:      * @return struct a status object containing the address and whether the deletion succeeded
42:      *     - email string the email address that was removed from the blacklist
43:      *     - deleted boolean whether the address was deleted successfully
44:      */
45:     public function delete($email) {
46:         $_params = array("email" => $email);
47:         return $this->master->call('whitelists/delete', $_params);
48:     }
49: 
50: }
51: 
52: 
53: 
API documentation generated by ApiGen 2.8.0