Why does HTML email appear normally sometimmes, and sometimes not?

This is a discussion on Why does HTML email appear normally sometimmes, and sometimes not? within the PHP Language forums, part of the PHP Programming Forums category; Hello, I have signed up a for a Google Gmail account. I sent myself some PHP-generated HTML emails from ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-25-2004
D. Alvarado
 
Posts: n/a
Default Why does HTML email appear normally sometimmes, and sometimes not?

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 = "dave@gmail.com";
$id = 1234;
$from = "sender@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: sender@suppressed.com
X-Mailer: PHP 4.3.9

Reply-to: sender@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
Reply With Quote
  #2 (permalink)  
Old 10-25-2004
Manuel Lemos
 
Posts: n/a
Default Re: Why does HTML email appear normally sometimmes, and sometimesnot?

Hello,

On 10/25/2004 10:14 AM, D. Alvarado wrote:
> 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:


That looks like one of the mail function bugs.

You may want to try this class that implements workarounds for some of
the problems. It also lets you compose and send HTML messages properly.
The way you did it may lead to messages never arriving for instance to
Hotmail accounts and other places.

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Reply With Quote
  #3 (permalink)  
Old 10-26-2004
Brandon Blackmoor
 
Posts: n/a
Default Re: Why does HTML email appear normally sometimmes, and sometimesnot?

Do not send HTML email. Period.
Reply With Quote
  #4 (permalink)  
Old 12-13-2004
David
 
Posts: n/a
Default Re: Why does HTML email appear normally sometimmes, and sometimes not?

sending html email is fine
it's a standard now. (thank heck MS rtf is falling out)
newsgroups are plain text, and email is html. Too common to just "not do it"
imho

"Brandon Blackmoor" <bblackmoor@blackgate.net> wrote in message
news:2u76bvF26uqa5U2@uni-berlin.de...
> Do not send HTML email. Period.



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0