Hello,
I have signed up a for a Google Gmail account. I sent myself some
PHP-generated HTML emails from two different machines using this code:
$to = "da**@gmail.com";
$id = 1234;
$from = "se****@suppressed.com";
$headers = "MIME-Version: 1.0\r\n"
. "Content-type: text/html;
charset=iso-8859-1\r\n"
. "Content-Transfer-Encoding:
7bit\r\n"
. "From: $from\r\n"
. "X-Mailer: PHP " . phpversion() .
"\r\n"
. "Reply-to: $from";
$body = "<html><head></head><body><a
href='cbssportsline.com'>Link</a><BR><b>Hello</b></body></html>";
if (!mail($to, "hello", $body, $headers)) {
die("Email delivery to $to
failed.\n");
} // if
When I send the email from my dev box, the HTML displays normally on
Gmail. However, when I upload the same code to my hosting company and
send an email, I open my gmail email and there's no HTML formatting
whatsoever. Here's what I see:
Content-type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
From: se****@suppressed.com
X-Mailer: PHP 4.3.9
Reply-to: se****@suppressed.com
<html><head></head><body><a
href='cbssportsline.com'>Link</a><BR><b>Hello</b></body></html>
The sender reads "(unknown sender)". Why do I see HTML-formatted
text some times and not others? How should I go about debugging this
problem?
Thanks for your help, - Dave