HI Thanks for this information, after many try I finally have a Correct script using sendmail, this is my script you need some thinks

1. $file are tha path to find the file 2. $namefile is the realname tu present un the e-mail 3. In $mail{body} you need know the TEXT after <<TEXT is the same of the final, and need start the line un the program, not indent. In my example user FINALBODY.

This are my changes for work:

use MIME::QuotedPrint; use MIME::Base64; use Mail::Sendmail; $host = "look.server.com.co"; $username = "MyEmailUser"; $password = "MyEmailPass"; $from = 'Willger@server.com.co'; $to = 'Torres@Server.com.co'; $mboundary="-FINALBLOCKgc0p4Jq0M2Yt08jU534c0p"; #this you cand select + any compouse of alfanumeric, but not change $mensaje = "Este es un mensaje en texto\n\n\n"; $html = "<HTLM><head><meta http-equiv=\"Content-Type\" content=\"text +/html; charset=ISO-8859-5\"></head> <p></p> <b>TEST TABLE</b> <p></p> <table border=1><tr><th>COLUMN1</th><th>COLUMN2</th><th>COLU +MN3</th></tr> <tr><th>DATA1</th><th>DATA2</th><th>DATA3</th></tr> <tr><th>NEXT1</th><th>NEXT2</th><th>NEXT3</th></tr> </table></HTML>"; %mail = ( 'To' => $to, 'From' => $from, 'Subject' => $asunto.$hora, 'Content-type' => 'multipart/mixed; charset=iso-8859-1; boundar +y='.$mboundary, ); ##Convert the file to encode base open (F, $mylocationfile) or die "Cannot read $file: $!"; binmode F; undef $/; $cfile = encode_base64(<F>); close F; $cfilelen = length $cfile; ##to start the next section of the mail $mboundary = '--'.$mboundary; $mail{body}= <<FINALBODY; $mboundary Content-Type: text/html; charset="iso-8859-1" $mensaje $html $mboundary Content-Disposition: attachment; filename="$mfilename" Content-Type: application/zip; name="$mfilename" Content-Transfer-Encoding: base64 Content-Length: $cfilelen $cfile $mboundary-- FINALBODY

Thanks, And I hope help you.

Willger Torres


In reply to Re^2: Emailing ZIP Attachment by Anonymous Monk
in thread Emailing ZIP Attachment by brianlois

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.