If your Exchange server is POP enabled you can access the message headers
using the Net::POP3 or Mail::POP3Client.
HTH.
Kind regards,
Trevor J. Joerges
--------------------------------------------
$_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl
rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn ,rrr8-)
;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;;
s;P;perl;g;s;,;\n;g;s;Y; ;g;s;q;\t;g;print;
--------------------------------------------
----- Original Message -----
From: "Giddings, Bret" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 4:21 AM
Subject: Accessing SMTP headers of messages
| Does anyone know if it is possible to extract the SMTP headers from
messages
| in Exchange using Win32::OLE (or other means). For example, I would like
to
| extract the /X-MailScanner.*/ headers from messages in a certain folder
(see
| below).
|
| 8< -------- cut here -------- >8
|
| use strict;
| use Win32::OLE qw(in with);
| use Win32::OLE::Const 'Microsoft Outlook';
|
| $Win32::OLE::Warn=2;
|
| my $outlook = Win32::OLE->new('Outlook.Application', undef);
| my $ol = Win32::OLE::Const->Load($outlook);
|
| my $namespace = $outlook->GetNamespace("MAPI");
| my $folder = $namespace->GetDefaultFolder(olFolderInbox);
| my $root = $folder->Parent();
| my $spam_folder=$root->Folders("Probable Spam");
| for my $item (in $spam_folder->Items()) {
| # extract header fields matches /^X-MailScanner/
| }
|
| 8< -------- cut here -------- >8
|
| If one has to name the fields (e.g. X-MailScanner-SpamCheck), then I can
| live with that.
|
| Bret
| --
| Bret Giddings, Systems Manager, Computing Service, University of Essex
| Tel: (01206) 872577 Email: [EMAIL PROTECTED] Fax: (01206) 860585
|
| _______________________________________________
| Perl-Win32-Admin mailing list
| [EMAIL PROTECTED]
| To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs