in reply to MIME to attach

At first glance that looks OK to me. I have attached an example multi-part mime message that seems to work fine with your code. Check the messages that you are feeding in and see if they are really multi-part.
From: Laura Rios <laura@oara.sf.ca.us> To: steve@ntecom.za Subject: Sara is two! Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Snip snip snip" Prologue: any text here is ignored by MIME mail programs --Snip snip snip Content-Type: text/enriched; charset="us-ascii" Hi, Steve. Sara had her second birthday yesterday. Can you believe i +t? She is so <bold>big</bold>! Now if we can just live through the "terrible twos" for a year, <italic>sigh</italic>. Here are a few words from her. I've also scanned in a picture of her party. Tell your boss thanks for letting us keep in touch by email. Laura --Snip snip snip Content-type: audio/basic Content-transfer-encoding: base64 Content-description: Sara says "I love you, Steve" (awww) /Xr++/hoX2lqeXt8d/7z8/D5+PLw7/b+9fD09319/vz5f3j//Pz9fHp7fvrs9Wz/eH59d /////////////////y8= --Snip snip snip Content-type: image/gif Content-transfer-encoding: base64 Content-description: Cutting the cake, sort of R0lGODdhQAHIAKMAAAAAAP+2bQAAACQAAAAASEgAAAAkSEgkJG0kJJEkAABIkZFIJCRttr +Zt l7Vry4B9aM+yKjifMosAADs= --Snip snip snip-- ----END----

Replies are listed 'Best First'.
Re^2: MIME to attach
by nathanvit (Beadle) on Jan 14, 2005 at 15:46 UTC
    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?