note 12981 deleted from function.mail by jimw

From: Date: Wed, 31 Oct 2001 23:23:42 +0000
Subject: note 12981 deleted from function.mail by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19912@lists.php.net to get a copy of this message
For those who prefer sending attachments with mail without using any other classes and dont know much about MIME. If you do not put an extra line break after attachment boundry headers, the first line of your attachment disappears silently, thus corrupting your attachment. It cost me 2 hours to find out the problem so just let you know :) $attachment .= "Content-Type: $rowOrdersauimg->imgtype;\n"; $attachment .= " name=\"$rowOrdersauimg->imgname\"\n"; $attachment .= "Content-Transfer-Encoding: base64\n"; $attachment .= "Content-Disposition: inline;\n"; $attachment .= " filename=\"$rowOrdersauimg->imgname\"";<br> $attachment .= "\n"; $attachment .= "\n"; <br> $attachment .= chunk_split(base64_encode($rowOrdersauimg->imgfile));<br> Tolga 'thorr' Orhon

« previous php.notes (#19912) next »