Class: Mandrill::Inbound

Inherits:
Object
  • Object
show all
Defined in:
lib/mandrill/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(master) ⇒ Inbound



466
467
468
# File 'lib/mandrill/api.rb', line 466

def initialize(master)
    @master = master
end

Instance Attribute Details

#masterObject

Returns the value of attribute master.



464
465
466
# File 'lib/mandrill/api.rb', line 464

def master
  @master
end

Instance Method Details

#domainsArray

List the domains that have been configured for inbound delivery



476
477
478
479
# File 'lib/mandrill/api.rb', line 476

def domains()
    _params = {}
    return @master.call 'inbound/domains', _params
end

#routes(domain) ⇒ Array

List the mailbox routes defined for an inbound domain



487
488
489
490
# File 'lib/mandrill/api.rb', line 487

def routes(domain)
    _params = {:domain => domain}
    return @master.call 'inbound/routes', _params
end

#send_raw(raw_message, to = nil, mail_from = nil, helo = nil, client_address = nil) ⇒ Array

Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP



504
505
506
507
# File 'lib/mandrill/api.rb', line 504

def send_raw(raw_message, to=nil, mail_from=nil, helo=nil, client_address=nil)
    _params = {:raw_message => raw_message, :to => to, :mail_from => mail_from, :helo => helo, :client_address => client_address}
    return @master.call 'inbound/send-raw', _params
end