Class: Exchanger::Mailbox

Inherits:
Element
  • Object
show all
Defined in:
lib/exchanger/elements/mailbox.rb

Overview

TODO It looks like this is the same as Address.

The Mailbox element identifies a mail-enabled Active Directory object.

The EmailAddress and ItemId elements identify a mailbox or distribution list. The EmailAddress element identifies a mailbox or distribution list by SMTP address. The ItemId element identifies a mailbox by an item identifier, which is associated with a particular mailbox. The ItemId element cannot be used for sending a message to a distribution list or a contact in a public contacts folder. An error will be thrown if this is used in a CreateItem, UpdateItem, or SendItem operation when an attempt is made to send a message to a distribution list or contact in a contacts public folder. Use the ExpandDL operation to get the SMTP address and then send the message by using the EmailAddress element instead of the ItemId element.

msdn.microsoft.com/en-us/library/aa565036.aspx

Instance Attribute Summary

Attributes inherited from Element

#tag_name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Element

#==, #assign_attributes_from_xml, create_element_accessors, element, #errors, #initialize, #inspect, key, new_from_xml, #to_xml, #to_xml_change, #to_xml_updates

Methods included from Persistence

#destroy, #new_record?, #persisted?, #reload, #save

Methods included from Dirty

#attribute_change, #attribute_changed?, #attribute_was, #changed, #changed?, #changes, included, #move_changes, #previous_changes, #reset_attribute!, #reset_modifications, #setup_modifications

Methods included from Attributes

#attributes, #attributes=, #change_key, #id, #identifier, #method_missing, #read_attribute, #respond_to?, #write_attribute

Constructor Details

This class inherits a constructor from Exchanger::Element

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Exchanger::Attributes

Class Method Details

.search(name) ⇒ Object



23
24
25
26
# File 'lib/exchanger/elements/mailbox.rb', line 23

def self.search(name)
  response = Exchanger::ResolveNames.run(:name => name)
  response.mailboxes
end

Instance Method Details

#membersObject



28
29
30
31
32
# File 'lib/exchanger/elements/mailbox.rb', line 28

def members
  return [] unless mailbox_type == "PublicDL"
  response = Exchanger::ExpandDL.run(:mailbox => self)
  response.mailboxes
end