class Mandrill::Whitelists

Attributes

master[RW]

Public Class Methods

new(master) click to toggle source
# File lib/mandrill/api.rb, line 1155
def initialize(master)
    @master = master
end

Public Instance Methods

add(email, comment=nil) click to toggle source

Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically. @param [String] email an email address to add to the whitelist @param [String] comment an optional description of why the email was whitelisted @return [Hash] a status object containing the address and the result of the operation

- [String] email the email address you provided
- [Boolean] added whether the operation succeeded
# File lib/mandrill/api.rb, line 1165
def add(email, comment=nil)
    _params = {:email => email, :comment => comment}
    return @master.call 'whitelists/add', _params
end
delete(email) click to toggle source

Removes an email address from the whitelist. @param [String] email the email address to remove from the whitelist @return [Hash] a status object containing the address and whether the deletion succeeded

- [String] email the email address that was removed from the blacklist
- [Boolean] deleted whether the address was deleted successfully
# File lib/mandrill/api.rb, line 1187
def delete(email)
    _params = {:email => email}
    return @master.call 'whitelists/delete', _params
end
list(email=nil) click to toggle source

Retrieves your email rejection whitelist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results. @param [String] email an optional email address or prefix to search by @return [Array] up to 1000 whitelist entries

- [Hash] return[] the information for each whitelist entry
    - [String] email the email that is whitelisted
    - [String] detail a description of why the email was whitelisted
    - [String] created_at when the email was added to the whitelist
# File lib/mandrill/api.rb, line 1177
def list(email=nil)
    _params = {:email => email}
    return @master.call 'whitelists/list', _params
end