php formatted html shows up in Yahoo mail but not gmail

fastman

New Member
I am using MAMP (LAMP stack development environment) to send emails using PHP.The code is below:\[code\]$out_message = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>You have requested an appointment with the Smile Zone</title></head><body><p style="font-family:Arial, Helvetica, sans-serif;"><strong>Dear '.$details_name.'</strong></p><p style="font-family:Arial, Helvetica, sans-serif">You have requested an appointment!</p><p style="padding:10px;"><strong>Please note that this appointment is currently unconfirmed</strong></p></body></html>';//now for the client side:$out_to = '[email protected]';$out_subject = 'My Subject';// To send HTML mail, the Content-type header must be set$headers = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";// Additional headers$headers .= "To: John <[email protected]> \r\n";$headers .= 'From: The Smile Zone <[email protected]>' . "\r\n";$success2 = mail($out_to, $out_subject, $out_message, $headers);\[/code\]When I send this email and view in Apple Mail, it appears as it should, however in GMail, in the browser all I get is the raw source.Why is this?
 
Back
Top