bray007
asked on
perl to add html file as body of email
I am simply trying to us MIME::Lite to add the contents of a pre-existing html file as the body of an email, not an attachment. I have everything working, regarding the email, but can't figure out how to place the html file as the body of an email. I can make it work using an attachment, but not in the body text.
Please let me know how to place the contents of a file into the body content of the email message.
I am using Unix.
Please let me know how to place the contents of a file into the body content of the email message.
I am using Unix.
#!/usr/bin/perl
use MIME::Lite;
use Net::SMTP;
my $mail_host = '11.111.11.11';
$msg = MIME::Lite->new)
From =>'myemail@home.com';
To =>'myfrom@home.com';
Subject =>'send as html inline';
Type =>'text/html';
Data =>'this is where the contents of the external html should go'
);
MIME::Lite->send('smtp', $mail_host, Timeout=>60);
$msg->send;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks a bunch!
Open in new window