Module: Teamlab::MailserverMailboxes
- Included in:
- MailServer
- Defined in:
- lib/teamlab/modules/mailserver/mailboxes.rb
Overview
Methods for working with mailserver mailboxes
Instance Method Summary collapse
-
#add_mailbox(name: nil, local_part: nil, domain_id: nil, user_id: nil, notify_current: true, notify_profile: true) ⇒ Hash
Add mailbox.
-
#delete_mailbox(id) ⇒ Hash
Deletes the selected mailbox.
-
#mailboxes ⇒ Hash
Mailboxes list.
Instance Method Details
#add_mailbox(name: nil, local_part: nil, domain_id: nil, user_id: nil, notify_current: true, notify_profile: true) ⇒ Hash
Returns Add mailbox.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/teamlab/modules/mailserver/mailboxes.rb', line 13 def add_mailbox(name: nil, local_part: nil, domain_id: nil, user_id: nil, notify_current: true, notify_profile: true) @request.post(%w[mailboxes add], name: name, local_part: local_part, domain_id: domain_id, user_id: user_id, notifyCurrent: notify_current, notifyProfile: notify_profile) end |
#delete_mailbox(id) ⇒ Hash
Deletes the selected mailbox
36 37 38 |
# File 'lib/teamlab/modules/mailserver/mailboxes.rb', line 36 def delete_mailbox(id) @request.delete(['mailboxes', 'remove', id.to_s]) end |
#mailboxes ⇒ Hash
Returns mailboxes list.
29 30 31 |
# File 'lib/teamlab/modules/mailserver/mailboxes.rb', line 29 def mailboxes @request.get(%w[mailboxes get]) end |