Class: Mailbox
- Inherits:
-
MailgunResource
- Object
- ActiveResource::Base
- MailgunResource
- Mailbox
- Defined in:
- lib/mailgun.rb
Overview
All mail arriving to email addresses that have mailboxes associated will be stored on the server and can be later accessed via IMAP or POP3 protocols.
Mailbox has several properties:
^ ^
| |
user domain
Class Method Summary collapse
-
.upsert_from_csv(mailboxes) ⇒ Object
Example of a CSV file: [email protected], password [email protected], password2.
Methods inherited from MailgunResource
Methods included from Mailgun::RequestBuilder
Class Method Details
.upsert_from_csv(mailboxes) ⇒ Object
Example of a CSV file:
[email protected], password [email protected], password2
152 153 154 155 156 157 |
# File 'lib/mailgun.rb', line 152 def self.upsert_from_csv(mailboxes) uri_str = "#{MailgunResource.site}mailboxes.txt?api_key=#{MailgunResource.password}" http, url = prepare_request(uri_str) res = http.post(url, mailboxes, {"Content-type" => "text/plain" }) Mailgun::handle_response(res) end |