Here is an Excel sending script which was posted by someone awhile ago:
#!/usr/bin/perl use MIME::Entity; use Net::SMTP; # create the multipart message with attachments $msg = MIME::Entity->build( Type => 'multipart/mixed', From => 'bogus@mail.com', # The "To" here is displayed in the message header as "To" # This is not the actual list of recipients To => '"Display Name" <user1@mail.com>, "Second Person" <user2@mail.com>', Subject => 'Automatic email of Excel report', ); $msg->attach( Type => 'application/msexcel', Path => $report, Filename => 'college_orders.xls', Encoding => 'base64' ); $msg->attach( Data => "Enclosed is the daily report of orders. (automated delivery)" ); # send the message $smtp = Net::SMTP->new("smtp.mail.com"); #authenticate if required $smtp->auth( "login", "passwd" ); # Identify yourself to the smtp server $smtp->mail('bogus@mail.com'); # The syntax for "To" is different in MIME::Entity and Net::SMTP # The "to" here is the list of actual recipients and is not displayed $smtp->to( 'user1@mail.com', 'user2@mail.com' ) || die "Bad address"; # Send the message and attachments $smtp->data( [ $msg->as_string ] ) || die "mail not accepted"; $smtp->quit; exit;

In reply to Re: Mail Attachment. by zentara
in thread Mail Attachment. by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.