Class: Mandrill::Inbound
- Inherits:
-
Object
- Object
- Mandrill::Inbound
- Defined in:
- lib/mandrill/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#add_domain(domain) ⇒ Hash
Add an inbound domain to your account.
-
#add_route(domain, pattern, url) ⇒ Hash
Add a new mailbox route to an inbound domain.
-
#check_domain(domain) ⇒ Hash
Check the MX settings for an inbound domain.
-
#delete_domain(domain) ⇒ Hash
Delete an inbound domain from the account.
-
#delete_route(id) ⇒ Hash
Delete an existing inbound mailbox route.
-
#domains ⇒ Array
List the domains that have been configured for inbound delivery.
-
#initialize(master) ⇒ Inbound
constructor
A new instance of Inbound.
-
#routes(domain) ⇒ Array
List the mailbox routes defined for an inbound domain.
-
#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.
-
#update_route(id, pattern = nil, url = nil) ⇒ Hash
Update the pattern or webhook of an existing inbound mailbox route.
Constructor Details
#initialize(master) ⇒ Inbound
Returns a new instance of Inbound.
491 492 493 |
# File 'lib/mandrill/api.rb', line 491 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
489 490 491 |
# File 'lib/mandrill/api.rb', line 489 def master @master end |
Instance Method Details
#add_domain(domain) ⇒ Hash
Add an inbound domain to your account
512 513 514 515 |
# File 'lib/mandrill/api.rb', line 512 def add_domain(domain) _params = {:domain => domain} return @master.call 'inbound/add-domain', _params end |
#add_route(domain, pattern, url) ⇒ Hash
Add a new mailbox route to an inbound domain
559 560 561 562 |
# File 'lib/mandrill/api.rb', line 559 def add_route(domain, pattern, url) _params = {:domain => domain, :pattern => pattern, :url => url} return @master.call 'inbound/add-route', _params end |
#check_domain(domain) ⇒ Hash
Check the MX settings for an inbound domain. The domain must have already been added with the add-domain call
523 524 525 526 |
# File 'lib/mandrill/api.rb', line 523 def check_domain(domain) _params = {:domain => domain} return @master.call 'inbound/check-domain', _params end |
#delete_domain(domain) ⇒ Hash
Delete an inbound domain from the account. All mail will stop routing for this domain immediately.
534 535 536 537 |
# File 'lib/mandrill/api.rb', line 534 def delete_domain(domain) _params = {:domain => domain} return @master.call 'inbound/delete-domain', _params end |
#delete_route(id) ⇒ Hash
Delete an existing inbound mailbox route
583 584 585 586 |
# File 'lib/mandrill/api.rb', line 583 def delete_route(id) _params = {:id => id} return @master.call 'inbound/delete-route', _params end |
#domains ⇒ Array
List the domains that have been configured for inbound delivery
501 502 503 504 |
# File 'lib/mandrill/api.rb', line 501 def domains() _params = {} return @master.call 'inbound/domains', _params end |
#routes(domain) ⇒ Array
List the mailbox routes defined for an inbound domain
546 547 548 549 |
# File 'lib/mandrill/api.rb', line 546 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
600 601 602 603 |
# File 'lib/mandrill/api.rb', line 600 def send_raw(, to=nil, mail_from=nil, helo=nil, client_address=nil) _params = {:raw_message => , :to => to, :mail_from => mail_from, :helo => helo, :client_address => client_address} return @master.call 'inbound/send-raw', _params end |
#update_route(id, pattern = nil, url = nil) ⇒ Hash
Update the pattern or webhook of an existing inbound mailbox route. If null is provided for any fields, the values will remain unchanged.
572 573 574 575 |
# File 'lib/mandrill/api.rb', line 572 def update_route(id, pattern=nil, url=nil) _params = {:id => id, :pattern => pattern, :url => url} return @master.call 'inbound/update-route', _params end |