Witam,
Problem polega na tym, że gdy chcę wysłać maila z załącznikiem, Onet nie interpretuje tego poprawnie i wyświetla mniej więcej:
Kod
--Message-Boundary
Content-type: text/html; charset=iso-8859-2
Content-transfer-encoding: 7BIT
Content-description: Mail message body

treść maila

--Message-Boundary
Content-type: file; name="log5.jpg"
Content-Transfer-Encoding: BASE64
Content-disposition: attachment; filename="log5.jpg"

/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQICAQEBAQMCAgICAwMEBAMD...
bJKo7ZakTXUDLKo7ZJVHbLUia6gZZVHbJKo7ZakTXUD/2Q==

--Message-Boundary--

Korzystam ze sposobu znalezionego u was na forum:
  1. <?php 
  2. $file=fopen(&#092;"tmp/\".$nazwa_zal,\"r\"); 
  3. $contents=fread($file,filesize(&#092;"tmp/\".$nazwa_zal)); 
  4. $encoded_attach=chunk_split(base64_encode($contents)); 
  5. fclose($file); 
  6.  
  7. $headers=&#092;"Content-type: multipart/mixed; \"; 
  8. $headers.=&#092;"boundary=\"Message-Boundary\"n\"; 
  9. $headers.=&#092;"Content-transfer-encoding: 7BITn\"; 
  10. $headers.=&#092;"X-attachments: $nazwa_zal\"; 
  11.  
  12. $top=&#092;"--Message-Boundaryn\"; 
  13. $top.=&#092;"Content-type: text/html; charset=iso-8859-2n\"; 
  14. $top.=&#092;"Content-transfer-encoding: 7BITn\"; 
  15. $top.=&#092;"Content-description: Mail message bodynn\"; 
  16.  
  17. $bottom=&#092;"nn--Message-Boundaryn\"; 
  18. $bottom.=&#092;"Content-type: \".filetype(\"tmp/\".$nazwa_zal).\"; name=\"$nazwa_zal\"n\"; 
  19. $bottom.=&#092;"Content-Transfer-Encoding: BASE64n\"; 
  20. $bottom.=&#092;"Content-disposition: attachment; filename=\"$nazwa_zal\"nn\"; 
  21. $bottom.=&#092;"$encoded_attachn\"; 
  22. $bottom.=&#092;"--Message-Boundary--n\"; php?>

OutlookExpres wyświetla wszystko poprawnie.
Albo ja tego nie łapę, albo Onet ma coś ze skrzynką na www (zresztą INTERIA podobnie)
Rodacy pomożecie? winksmiley.jpg