What is the character at the end of the line? Is it \n?
I used to populate my file:
for($i=1; $i<=$mail->Count(); $i++){ open(FILE,">prova.MSG"); foreach($mail->HeadAndBody($i)){ print FILE "$_ \n"; } close(FILE); $mail->Close(); }
Is it correct? My message is similar to yours:
Return-path: <vittorio.zuccala@ditta.it> Envelope-to: vittorio.zuccala@ditta.it Delivery-date: Fri, 14 Jan 2005 16:37:57 +0100 Received: from [192.168.50.195] (helo=[192.168.50.195]) by debianexim.finconsumo.it with esmtp (Exim 4.34) id 1CpTWO-0003GE-QV for vittorio.zuccala@ditta.it; Fri, 14 Jan 2005 16:37:57 +0100 ...... This is a multi-part message in MIME format. --------------030508080500040304000008 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit ... --------------030508080500040304000008 Content-Type: application/pdf; name="PlainLanguage.pdf" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="PlainLanguage.pdf"
But it tells me there are 0 parts but that mail has 3 attachments!! Any suggestions please?

In reply to Re^2: MIME to attach by nathanvit
in thread MIME to attach by nathanvit

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.