How bout something like this (untested but should work):
sub Email_Results{
$msg = MIME::Lite->new(
From => 'net-admin@someplace.org',
To => 'decoraw@someplace.org',
Subject => 'Trying to send attachment',
Type => 'multipart/mixed');
$msg->attach(
Type => 'text/html',
Data => << "EOHTML"
<html>
<head>
<title>Human Resources : Application for Employment</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859
+-1">
</head>
<body bgcolor="#FFFFFF" marginwidth="0" marginheight="0" class="margin
+">
<table width="600" border="0">
<tr valign="top">
<td width="300"><font face="Arial, Helvetica, sans-serif" size="
+-1">
<b>Name:</b> <i>$name</i></font>
</td>
</tr>
</table>
</body>
</html>
EOHTML
);
$msg->attach(
Type => 'application/octet-stream',
Path => "$Directory/$File_Name",
Filename => $File_Name );
$msg->send();
}
Granted you could probably use some templating system to create the message for example
Template Toolkit as shown in
the introduction doc, pass the results to a variable then attach that to Data. Also if you use ' instead of " for quoting text you will not be able to interpolate variables (though with
eval you could get back what you wanted as well)
-enlil