note 61644 modified in ref.mail by colder
| From: | colder@php.net | Date: | Wed, 31 May 2006 17:52:04 +0000 |
| Subject: | note 61644 modified in ref.mail by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-112663@lists.php.net to get a copy of this message | ||
Corrupted Attachments ???
I spent many hours with corrupted attachments (of all types of files) - The answer: a blank line is
needed after $msg.=$file \r\n \r\n [incredible but true].
Heres some useful code for sending an attachment, and display html OR text depending on the users
email-reader.
i work with many different systems, so...
I hope this helps.
Jon Webb [Madrid&London]
--was--
Corrupted Attachments ???
I spent many hours with corrupted attachments (of all types of files) - The answer: a blank line is
needed after $msg.=$file \r\n \r\n [incredible but true].
Heres some useful code for sending an attachment, and display html OR text depending on the users
email-reader.
i work with many different systems, so...
<?php # Is the OS Windows or Mac or Linux
if (strtoupper(substr(PHP_OS,0,3)=='WIN')) {
$eol="\r\n";
} elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) {
$eol="\r";
} else {
$eol="\n";
} ?>
I hope this helps.
Jon Webb [Madrid&London]
http://php.net/manual/en/ref.mail.php