Hi all,

I am trying to write a simple Perl script that will accept the HTML
file as one argument and then send an e-mail with the HTML file. I
don't want the HTML file attached to the e-mail but to be part of the
body of the e-mail. In other words, I need the HTML file that I am
sending to be the actual body of the e-mail.
I am new to Perl so this is what I have so far:

use strict;
use MIME::Lite;
use Date::Calc qw(:all);

# SendTo email id
my $to_id = '[EMAIL PROTECTED]';
my $filename=$ARGV[0];
chomp (my $date = `date +%A" "%B" "%d","%Y`);
my $subject = sprintf("SAN Capacity Report:
%s",Date_to_Text_Long(Today()));

# create a new MIME Lite based email
my $msg = MIME::Lite->new
(
>From    => '[EMAIL PROTECTED]',
To      => $to_id,
Subject => $subject,
Type    => 'multipart/mixed',
);

$msg->send();

I am not sure how to make the $filename which is the HTML file passed
to the script so it gets sent as part of the body of the e-mail.

Any help would be appreciate it.

Thanks,

BTNA


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to