RE: [PHP] Mail() not setting MIME TYPE

From: Date: Tue, 14 Aug 2001 06:53:45 +0000
Subject: RE: [PHP] Mail() not setting MIME TYPE
Groups: php.general 
Request: Send a blank email to php-general+get-62585@lists.php.net to get a copy of this message
$mail = mail("$address", "$subject", "$body", "$headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" ); Hi peter, You've got a space and a newline right after the headers ($headers).. they shouldn't be there.. and i'd put a \n after 64bit I don't know if that will solve your problem, but from what i understand of headers, it should help :) by the way, make sure that your "$headers \nContent-Type: .. etc" string is all on the same line... also, why aren't you using the $headers variable for your extra header information? Cheers James Quinn-Hawtin Web Development Training Online International http://www.trainingonline.com.au/ -----Original Message----- From: Peter Houchin [SMTP:peterh@vfsa.com.au] Sent: Tuesday, August 14, 2001 4:20 PM To: php-general@lists.php.net Subject: [PHP] Mail() not setting MIME TYPE Hi, can some one please have a look at this and tell me why it's not setting correctly? <? $address .= "blah@blah.com.au"; // Subject $subject = "VFSA-eRentals Application Form"; //Body of email $body = "<html> <title> VFSA-eRentals Application </title> <body> <table> <tr> <td>howdy ho stranger</td> </tr> <tr> <td>how aint ya doing</td> </tr> </table> "; $headers .= "From: VFSA-eRentals <webmaster@vfsa-erentals.com.au>\n"; $headers .= "X-Sender: VFSA-eRentals <webmaster@vfsa-erentals.com.au>\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "Return-Path: VFSA-eRentals <webmaster@vfsa-erentals.com.au>\n"; // Return path for errors $headers .= "X-Priority: 1\n"; // Urgent message! /* If you want to send html mail, uncomment the following line */ //$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type //send the email $mail = mail("$address", "$subject", "$body", "$headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" ); ?> Now that doesn't show all the html I use in the body but it will give you an idea.. as far as I can tell this script should work and set the content-type to text/html but when it sends the email the Content-Type: text/html; charset=iso-8859-1 is changed to Content-Type: text/plain; charset=us-ascii and I get this after it's set the content type X-BadHeader: html; charset=iso-8859-1 but from looking in the PHP manual and php books I have the way I've tried to set it should be right. if you want to look at my page with the script on let me know and I will send it to you off the list. thanks in advance ------------------------------------------------------ Peter Houchin Sun Rentals STR Manager Phone: 03 9329 1455 Fax: 03 9329 6755 peterh@sunrentals.com.au http://www.sun.com.au/rentals ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ************* We rent the dot in .COM! ************** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#62585) next »