in reply to Re: Connect to Microsoft Exchange
in thread Connect to Microsoft Exchange

The version of exchange I believe is 2007. Yes I have taken a look at IMAP family of Modules but the problem is privileges to install a module. Net::POP3 is already installed so gave it a try but it is not working. Here is that i used:

use strict; use warnings; use Net::POP3; my $pop = Net::POP3->new('abc.xx.com'); if ($pop->login('XXXX', 'YYYYYYY') > 0) { my $msgnums = $pop->list; # hashref of msgnum => size foreach my $msgnum (keys %$msgnums) { my $msg = $pop->get($msgnum); print @$msg; #$pop->delete($msgnum); } } $pop->quit;

As far as control over the exchange server is concerned i think that would be a problem.

Thanks

Replies are listed 'Best First'.
Re^3: Connect to Microsoft Exchange
by afoken (Chancellor) on Nov 25, 2010 at 18:20 UTC

    You don't need privileges to install modules. You would only need them if you wanted to install them for all users. Obligatory link: Yes, even you can use CPAN.

    Regarding access to Exchange, you could use:

    • SMTP (only useful for sending e-mails)
    • POP3 (may be disabled)
    • IMAP (may be disabled)
    • OWA (Outlook Web Access), i.e. HTTP, HTML, Javascript and some DAV variant
    • Some propritary protocol used by Outlook

    Ask the Exchange admin(s), or use a quick TCP connect port scan.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      Thanks Alexander

      I installed Mail::IMAPClient but i m not able to connect to the exchange server.

      use strict; use warnings; use Mail::IMAPClient; my $imap = Mail::IMAPClient->new( Server => 'XXXX.YYYY.com', User => 'XXXX', Password => 'YYYY', Ssl => 1, Uid => 1, ); my $folders = $imap->folders or die "List folders error: ", $imap->LastError, "\n"; print "Folders: @$folders\n";
      Thanks

        Are you sure IMAP is enabled on the Exchange server? With SSL? Have you asked the server admin or did you run a port scan? What output do you see? Why don't you check that new() was successful?

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)