note 40232 added to function.mail

From: Date: Thu, 26 Feb 2004 05:01:21 +0000
Subject: note 40232 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-65771@lists.php.net to get a copy of this message
In response to: > Hubert Ley <hley at anl dot gov> > 30-Jan-2004 11:08 > The previous two examples for attaching files to a message > have a significant flaw that shows up when attaching > binary files (e.g. zipped or gzipped files). ... > versions seem to have a function "file_get_contents" that > seems to do the right thing, but I am unable to verify this. I use <?php $data = chunk_split(base64_encode(implode("", file($file)))); ?> and it works fine for text, binary, and zipped files. file_get_contents(), on the other hand, seems to create faulty stream. ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40232 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40232&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40232&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65771) next »