note 42508 added to function.mail

From: Date: Wed, 19 May 2004 10:21:38 +0000
Subject: note 42508 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-69822@lists.php.net to get a copy of this message
Just a quick addition to the nice function by "j [at] jgdataworks.com" Change this: <?php $content.= "Content-Type: Application/Octet-Stream;"; ?> into: <?php $content.= "Content-Type: " . mime_content_type ( $filelocation ) . ";"; ?> The mime-type will be set to match the attached file. This comes in handy when sending images. If your PHP install does not support the mime_content_type function you could use the unix "file" command. ( see mime_content_type comments ). ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42508 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42508&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42508&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69822) next »