note 88302 deleted from function.mail by cmb
| From: | cmb@php.net | Date: | Sun, 22 Sep 2019 08:12:34 +0000 |
| Subject: | note 88302 deleted from function.mail by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212331@lists.php.net to get a copy of this message | ||
Note Submitter: orjtor
----
This is my solution of problems with Windows Mail on Vista. I got some of the headers in the mail
body as plain text. When I removed '\r' and left just '\n' at the end of the two
last lines of header it worked. This error didn't show up in my yahoo mail.
<?php
$body = "<html>\n";
$body .= "<body style=\"font-family:Verdana, Verdana, Geneva, sans-serif;
font-size:12px; color:#666666;\">\n";
$body = $message;
$body .= "</body>\n";
$body .= "</html>\n";
$headers = "From: My site<noreply@example.com>\r\n";
$headers .= "Reply-To: info@example.com\r\n";
$headers .= "Return-Path: info@example.com\r\n";
$headers .= "X-Mailer: Drupal\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
return mail($recipient, $subject, $message, $headers);
?>