Hello monks,
I am having a problem attaching an excel file with MIME::Lite. In outlook it says the file is corrupted and opens blank even though it is 328B. Here is my section of code that I attempted to perform this with:
my $msg = MIME::Lite->new(
From => 'me@me.com',
To => 'me@me.com',
#Cc => 'some@other.com, some@more.com',
Subject => 'Report',
Type => 'multipart/mixed'
);
$msg->attach(
Type =>'TEXT',
Data =>"Here is the Report"
);
$msg->attach(
Type => 'application/vnd.ms-excel',
Encoding => 'base64',
Path => "/report.xls",
Filename => 'report.xls'
);
$msg->send;
Is it something with the encoding that I am not getting?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|