[HRPM] Perl & Outlook
chicks at chicks.net
chicks at chicks.net
Sat Dec 23 07:37:37 CST 2000
I thought this might be of interest to some - how to interface perl and
Outlook.
Also - I haven't been very proactive in figuring out a location for our
social get together next week. Can people let me know if they're planning
on attending? With the flu and the weather I haven't been too
enthusiastic about scouting locations which I had planned on doing last
week.
--
</chris>
If you're not part of the solution, you're part of the precipitate.
- Steven Wright
---------- Forwarded message ----------
Message: 13
From: "Reiner Buehl" <reiner_buehl at gmx.net>
To: <Perl-Win32-Users at listserv1.ActiveState.com>
Subject: RE: Perl & Outlook
Date: Fri, 22 Dec 2000 14:57:07 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C06C27.74176AF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hi,
attached are two samples that I got to work after spending hours on it.
The filenames should speak for themselves. One thing that I never got
to work was selecting a different Mail account than the default account.
If anybody can explain how to do that, I would be very interested.
Best Regards,
Reiner.
> -----Original Message-----
> Could anyone please tell me if there are examples out there on the web of
> using Perl and Outlook? How can I used perl to access PST files? Are there
> any resources available?
------=_NextPart_000_0008_01C06C27.74176AF0
Content-Type: application/octet-stream;
name="CreateFolder.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="CreateFolder.pl"
use strict;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit');
my $ol = Win32::OLE::Const->Load($Outlook);
my $namespace = $Outlook->GetNamespace("MAPI");
my $Folder = $namespace->GetDefaultFolder(olFolderInbox);
my $NewFolder = $Folder->Folders->Add("Test1");
------=_NextPart_000_0008_01C06C27.74176AF0
Content-Type: application/octet-stream;
name="OutlookSend.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="OutlookSend.pl"
use strict;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit');
my $ol = Win32::OLE::Const->Load($Outlook);
my $namespace = $Outlook->GetNamespace("MAPI");
my $Folder = $namespace->GetDefaultFolder(olFolderInbox);
my $NewMail = $Outlook->CreateItem(olMailItem);
$NewMail->Recipients->Add("user\@host.domain.net");
$NewMail->{Subject} = "Test Message via Perl";
$NewMail->{Body} = "Test Message Body\n\nBest Regards,\nReiner.\n";
$NewMail->Send;
------=_NextPart_000_0008_01C06C27.74176AF0--
More information about the Norfolk-pm
mailing list