Method: Mandrill::Rejects#add

Defined in:
lib/mandrill/api.rb

#add(email, comment = nil, subaccount = nil) ⇒ Hash

Adds an email to your email rejection blacklist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your blacklist. Attempting to blacklist an address that has been whitelisted will have no effect.

Parameters:

  • email (String)

    an email address to block

  • comment (String) (defaults to: nil)

    an optional comment describing the rejection

  • subaccount (String) (defaults to: nil)

    an optional unique identifier for the subaccount to limit the blacklist entry

Returns:

  • (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



438
439
440
441
# File 'lib/mandrill/api.rb', line 438

def add(email, comment=nil, subaccount=nil)
    _params = {:email => email, :comment => comment, :subaccount => subaccount}
    return @master.call 'rejects/add', _params
end