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--
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:
<?php $headers=\"Content-type: multipart/mixed; \"; $headers.=\"boundary=\"Message-Boundary\"n\"; $headers.=\"Content-transfer-encoding: 7BITn\"; $headers.=\"X-attachments: $nazwa_zal\"; $top=\"--Message-Boundaryn\"; $top.=\"Content-type: text/html; charset=iso-8859-2n\"; $top.=\"Content-transfer-encoding: 7BITn\"; $top.=\"Content-description: Mail message bodynn\"; $bottom=\"nn--Message-Boundaryn\"; $bottom.=\"Content-type: \".filetype(\"tmp/\".$nazwa_zal).\"; name=\"$nazwa_zal\"n\"; $bottom.=\"Content-Transfer-Encoding: BASE64n\"; $bottom.=\"Content-disposition: attachment; filename=\"$nazwa_zal\"nn\"; $bottom.=\"$encoded_attachn\"; $bottom.=\"--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?
