Class: UpdatedMandrill::Inbound
- Inherits:
-
Object
- Object
- UpdatedMandrill::Inbound
- Defined in:
- lib/updated_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
489 490 491 |
# File 'lib/updated_mandrill/api.rb', line 489 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
487 488 489 |
# File 'lib/updated_mandrill/api.rb', line 487 def master @master end |
Instance Method Details
#add_domain(domain) ⇒ Hash
Add an inbound domain to your account
510 511 512 513 |
# File 'lib/updated_mandrill/api.rb', line 510 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
557 558 559 560 |
# File 'lib/updated_mandrill/api.rb', line 557 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
521 522 523 524 |
# File 'lib/updated_mandrill/api.rb', line 521 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.
532 533 534 535 |
# File 'lib/updated_mandrill/api.rb', line 532 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
581 582 583 584 |
# File 'lib/updated_mandrill/api.rb', line 581 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
499 500 501 502 |
# File 'lib/updated_mandrill/api.rb', line 499 def domains() _params = {} return @master.call 'inbound/domains', _params end |
#routes(domain) ⇒ Array
List the mailbox routes defined for an inbound domain
544 545 546 547 |
# File 'lib/updated_mandrill/api.rb', line 544 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
598 599 600 601 |
# File 'lib/updated_mandrill/api.rb', line 598 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.
570 571 572 573 |
# File 'lib/updated_mandrill/api.rb', line 570 def update_route(id, pattern=nil, url=nil) _params = {:id => id, :pattern => pattern, :url => url} return @master.call 'inbound/update-route', _params end |