Email::Folder::Exchange - Access your Microsoft Exchange 2000/2003/2007/2010 email from perl


Email-Folder-Exchange documentation  | view source Contained in the Email-Folder-Exchange distribution.

Index


NAME

Top

Email::Folder::Exchange - Access your Microsoft Exchange 2000/2003/2007/2010 email from perl

SYNOPSIS

Top

  use Email::Folder::Exchange;

	# Access Exchange 2000/2003 via WebDAV
  my $folder = Email::Folder::Exchange->new('http://owa.myorg.com/user/Inbox', 'user', 'password');

	# Access Exchange 2007/2010 via Exchange Web Services
  my $folder = Email::Folder::Exchange->new('http://owa.myorg.com', 'user', 'password');

  for my $message ($folder->messages) {
    print "subject: " . $subject->header('Subject');
  }

  for my $folder ($folder->folders) {
    print "folder uri: " . $folder->uri->as_string;
    print " contains " . scalar($folder->messages) . " messages";
    print " contains " . scalar($folder->folders) . " folders";
  }




DESCRIPTION

Top

Add access to Microsoft Exchange to Email::Folder. Contains API enhancements to allow folder browsing.

Email::Folder::Exchange is a wrapper around two modules [included]:

Email::Folder::Exchange::WebDAV - Access Exchange 2000/2003 via WebDAV
Email::Folder::Exchange::EWS - Access Exchange 2007/2010 via EWS

Each module has its own extensions to the Email:Folder protocol.

First, the module tries to connect via EWS. If the server reports a 404 error, the module attempts to fallback to WebDAV.

new($url, [$username, $password])

Create Email::Folder::Exchange object and login to OWA site.

url

URL of the target folder.

username

Username to authenticate as. Generally in the form of 'domain\username'. Overrides URL-supplied username if given.

password

Password to authenticate with. Overrides URL-supplied password.

messages()

Return a list containing all of the messages in the folder. Can only be called once as it drains the iterator.

next_message()

Return next message as Email::Simple object from folder. Acts as iterator. Returns undef at end of folder contents.

folders()

Return a list of Email::Folder::Exchange objects contained within base folder. Can only be called once as it drains the iterator.

next_folder()

Return next folder under base folder as Email::Folder::Exchange object. Acts as iterator. Returns undef at end of list.

uri()

Return URI locator object for current folder.

CAVEATS

Top

  Can't locate object method "new" via package "LWP::Protocol::https::Socket"

Install the Crypt::SSLeay module in order to support SSL URLs

 The server cannot service this request right now. Try again later.

This error indicates the mailbox is has too many messages or the specified message is too large to retrieve via web services.

SEE ALSO

Top

Email::Folder, URI, Email::Simple, Crypt::SSLeay

AUTHOR

Top

Warren Smith <lt>wsmith@cpan.org<gt>

COPYRIGHT AND LICENSE

Top


Email-Folder-Exchange documentation  | view source Contained in the Email-Folder-Exchange distribution.