29 Mar 2005 17:32:28 UTC
- Distribution: Mail-Outlook
- Module version: 0.08
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (5)
- Testers (1 / 0 / 0)
- KwaliteeBus factor: 0
- License: unknown
- Activity24 month
- Download (7.71KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionBARBIE Barbie
- BUGS, PATCHES & FIXES
- FUTURE ENHANCEMENTS
- SEE ALSO
- COPYRIGHT AND LICENSE
Mail::Outlook - mail module to interface with Microsoft (R) Outlook (R).
# create the object use Mail::Outlook; my $outlook = new Mail::Outlook(); # start with a folder my $outlook = new Mail::Outlook('Inbox'); # use the Win32::OLE::Const definitions use Mail::Outlook; use Win32::OLE::Const 'Microsoft Outlook'; my $outlook = new Mail::Outlook(olInbox); # get/set the current folder my $folder = $outlook->folder(); my $folder = $outlook->folder('Inbox'); # get the first/last/next/previous message my $message = $folder->first(); $message = $folder->next(); $message = $folder->last(); $message = $folder->previous(); # read the attributes of the current message my $text = $message->From(); $text = $message->To(); $text = $message->Cc(); $text = $message->Bcc(); $text = $message->Subject(); $text = $message->Body(); # use Outlook to display the current message $message->display; # create a message for sending my $message = $outlook->create(); $message->To('firstname.lastname@example.org'); $message->Cc('Them <email@example.com>'); $message->Bcc('Us <firstname.lastname@example.org>; email@example.com'); $message->Subject('Blah Blah Blah'); $message->Body('Yadda Yadda Yadda'); $message->send; # Or use a hash my %hash = ( To => 'firstname.lastname@example.org', Cc => 'Them <email@example.com>', Bcc => 'Us <firstname.lastname@example.org>, email@example.com', Subject => 'Blah Blah Blah', Body => 'Yadda Yadda Yadda', ); my $message = $outlook->create(%hash); $message->display(%hash); $message->send(%hash);
This module was written to overcome the problem of sending mail messages, where Microsoft (R) Outlook (R) is the only mail application available. However, since it's inception the module has expanded to handle a range of Outlook mail functionality.
Note that when sending messages, the module uses the named owner of the Outbox MAPI Folder in order to access the correct objects. Thus the From field of a new message is predetermined, and therefore a read only property.
If using the 'Win32::OLE::Const' constants, only the following are currently supported:
olFolderInbox olFolderOutbox olFolderSentMail
A mail module to interface with mail message accessible via Microsoft (R) Outlook (R).
Create a new Outlook mail object. Returns the object on success or undef on failure. To see the last error use 'Win32::OLE->LastError();'.
Gets or sets the current folder object.
Creates a new message. Option hash table can be used. Returns the new message object or undef on failure.
There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please send an email to firstname.lastname@example.org or submit a bug to the RT system (http://rt.cpan.org/). However, it would help greatly if you are able to pinpoint problems or even supply a patch.
If you intend to supply a patch, please visit the following URL (and associated pages) to ensure you are using the correct objects and methods.
This article contains some interesting background into creating mail messages via Outlook, although it is VB-centric.
Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me.
A couple of items that I'd like to get working.
* X-Header support * Send without the popups (Outlook Redemption looks possible)
This module is intended to be used on Win32 platforms only, with Microsoft (R) Outlook (R) installed.
Microsoft and Outlook are registered trademarks and the copyright 1995-2003 of Microsoft Corporation. All rights reserved.
b - Beta testing d - Developer p - Perl-only O - Object oriented p - Standard-Perl: user may choose between GPL and Artistic
Barbie, <email@example.com> for Miss Barbell Productions, http://www.missbarbell.co.uk
Copyright (C) 2003-2005 Barbie for Miss Barbell Productions All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Mail::Outlook, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Mail::Outlook
For more information on module installation, please visit the detailed CPAN module installation guide.