No bugs. The module works really well and simplifies a ton of stuff for
me. Thank you! Here is a suggested patch to enhance Mail::Outlook. I
use it because I often have to send HTML messages.
This patch adds HTML capability. Call ->BodyAsHTML with any "true" value
and the Body of the message is flagged as being HTML. This is similar to
what Powershell offers with the Send-MailMessage cmdlet.
Subject: | Mail-Outlook-Message.patch |
--- OrigMessage.pm 2012-01-09 08:54:23.125195200 -0800
+++ ..\site\lib\Mail\Outlook\Message.pm 2012-01-09 10:10:30.381344200 -0800
@@ -36,7 +36,7 @@
#Variables
#############################################################################
-my @autosubs = qw(To Cc Bcc Subject Body SenderName);
+my @autosubs = qw(To Cc Bcc Subject Body SenderName BodyAsHTML);
my %autosubs = map {$_ => 1} @autosubs;
#----------------------------------------------------------------------------
@@ -381,7 +381,12 @@
$self->{message}->{Cc} = $self->{Cc} if($self->{Cc});
$self->{message}->{Bcc} = $self->{Bcc} if($self->{Bcc});
$self->{message}->{Subject} = $self->{Subject};
- $self->{message}->{Body} = $self->{Body};
+ if ($self->{BodyAsHTML}) {
+ $self->{message}->{BodyFormat} = olFormatHTML;
+ $self->{message}->{HTMLBody} = $self->{Body};
+ } else {
+ $self->{message}->{Body} = $self->{Body};
+ }
if ($self->{Attach}) {
$self->{attachment} = $self->{message}->Attachments;