P
paddyxmurphy
Hi,
I am using Mail::Outlook to send email through Outlook. I've set out
the code below. Everything works fine but I have two items on my wish
list.
1. To be able to send attachments. I have tried
'$message->Attachments('c:\file.txt');' and
'$message->Attachments.Add('c:\file.txt');' but neither work.
2. To be able to send the email in html format but
'$message->HTMLBody($body);' doesn't work.
Are either of these possible using Mail::Outlook or do I need to go
back to scratch and use another module?
Thanks
Paddy
#################################################################################
# CODE
#!/usr/bin/perl
use strict;
use warnings;
use Mail::Outlook;
use Win32::OLE::Const 'Microsoft Outlook';
my $outlook = new Mail::Outlook();
my $to = "my_mom\@moms_mail.com";
my $body = "Hi Mom!\n\n etc.";
my $message = $outlook->create();
$message->To($to);
$message->Cc();
$message->Bcc();
$message->Subject('Happy Mothers Day, Mom!);
$message->Body($body);
#$message->HTMLBody($body);
#$message->Attachments('c:\Card.pdf');
$message->send;
I am using Mail::Outlook to send email through Outlook. I've set out
the code below. Everything works fine but I have two items on my wish
list.
1. To be able to send attachments. I have tried
'$message->Attachments('c:\file.txt');' and
'$message->Attachments.Add('c:\file.txt');' but neither work.
2. To be able to send the email in html format but
'$message->HTMLBody($body);' doesn't work.
Are either of these possible using Mail::Outlook or do I need to go
back to scratch and use another module?
Thanks
Paddy
#################################################################################
# CODE
#!/usr/bin/perl
use strict;
use warnings;
use Mail::Outlook;
use Win32::OLE::Const 'Microsoft Outlook';
my $outlook = new Mail::Outlook();
my $to = "my_mom\@moms_mail.com";
my $body = "Hi Mom!\n\n etc.";
my $message = $outlook->create();
$message->To($to);
$message->Cc();
$message->Bcc();
$message->Subject('Happy Mothers Day, Mom!);
$message->Body($body);
#$message->HTMLBody($body);
#$message->Attachments('c:\Card.pdf');
$message->send;