I create an html report file with a perl script. I now want to use Mail::Sender to email the file to several users. However, I do not want to send the file as an attachment. I want the html file to be the content of the mail message. I am not quite sure of how to do this. Below is what I have so far. I am thinking I need to pass the file to the "msg" parameneter of sender::MailFile instead of "file" parameter but I am just not sure as I cannot get anything with a file to work at this time. Sending a simple message works fine, just not sending a file. Can you point me in the right direction ? Thanks.
Code:
$my_html_report = "\home\reports\my_html_report.htm"
my $sender = new Mail::Sender;
$sender->MailFile({ {to => "$email",
from => 'me_testing',
SMTP => 'mail.mybusiness.com',
replyto => 'me_please',
file => "$my_html_report",
subject => "My HTML Report",
msg => "Emailing \" $my_html_report \"",
auth => 'LOGIN',
authid => 'myuserid',
authpwd => 'mypassword',
ctype => "text/html",
encoding => "7bit" });