#www.benhall.co.uk
use Win32::OLE qw(in with OVERLOAD);
# outlook profile
my $sender = "Ken Cornetet 1";
my $passwd = ""; # your password here
#
# PROGRAM STARTS HERE
#
# Create a new MAPI Session
#
print "Initialising OLE & MAPI...\n";
my $session = Win32::OLE->new("MAPI.Session");
if(Win32::OLE->LastError() != 0) {
die "Could not create a new MAPI Session: ", Win32::OLE->LastError(), "\n";
}
# Attempt to log on
#
print "Logging on to Exchange server...\n";
if ($err) {
die "Logon failed: $!";
}
my $folder = $store->RootFolder->Folders("Inbox");
my $message_count = $messages->Count;
my $msg = "";
if ($i == 1) {
$msg = $messages->GetFirst();
} else {
$msg = $messages->GetNext();
}
print "From: ", $msg->{Sender}->{Address}, "\n";
}
$session->Logoff();
From: Raymond Forbes [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 2:08 PM
To: 'Ahlsen-Girard Edward F Contr ESC/ACU OL1'; 'Prohaska, Tim'; [EMAIL PROTECTED]
Subject: RE: reading mail from Exchange
I would like a similar solution if one is possible.I am making a "heartbeat" check you could say. I want an account to log in and check mail and i can use that to determine the status of the exchange server.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ahlsen-Girard Edward F Contr ESC/ACU OL1
Sent: Thursday, October 09, 2003 11:56 AM
To: 'Prohaska, Tim'; Ahlsen-Girard Edward F Contr ESC/ACU OL1; [EMAIL PROTECTED]
Subject: RE: reading mail from ExchangeNot an option - I don't control the server.
-----Original Message-----
From: Prohaska, Tim [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 09, 2003 13:35
To: 'Ahlsen-Girard Edward F Contr ESC/ACU OL1';
[EMAIL PROTECTED]
Subject: RE: reading mail from Exchange
Have you considered using an IMAP client.
-----Original Message-----
From: Ahlsen-Girard Edward F Contr ESC/ACU OL1 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 09, 2003 12:52 PM
To: [EMAIL PROTECTED]
Subject: reading mail from Exchange
I am trying to get a script to read mail from an Exchange server that does *not* allow POP3 clients. I want to avoid
opening any windows at all, because this is for an unattended application form processor. Anyone have any ideas?
--
Ed Ahlsen-Girard mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Network Administrator 850-882-6540x5349 ESC/ACU OL1
TYBRIN Corporation DSN:872-6540x5349 205 West D Ave (Bldg 350), Ste 628
LAN Integration FAX: 850-882-6379 Eglin AFB, FL 32542http://www.tybrin.com <http://www.tybrin.com> http://www.eglin.af.mil/mission-planning
<http://www.eglin.af.mil/mission-planning>