Re: php formatted html shows up in Yahoo mail but not gmail



Manuel Lemos wrote:
Hello,

on 04/29/2007 10:31 PM cybervigilante said the following:
I sent HTML formatted email, using PHP, to my Yahoo address from my
server, and it came out fine, styles and all. I sent it to my gmail
address to test it and all I see is the raw html code. But I do get
formatted email in gmail, so I know people make it work somehow. I'm
looking right at a gmail message that I copied to Dreamweaver and it's
using Strong and Red text attributes that work in gmail. But mine
don't.

What do you do different in gmail to get formatted HTML email?

You should not send HTML mail messages with a plain text alternative
part. When you do that, mail systems may take it as a sign of spam, as
real mail programs do not send messages that way.

You should compose a multipart/alternative message that contains a text
part and an HTML mail part.

If you do not know how to do that, take a look at this MIME message
class as it makes that task much simpler. Try the
test_simple_html_mail_message.php script.

http://www.phpclasses.org/mimemessage



Actually, you NEED to send both HTML and plain text. Otherwise people who accept only plain text will not receive it. Any mail with special encodings (such as HTML) should include a plain text version.

But did you also indicate the content was multi-part, including both text and text/html content? Did it have the appropriate separators?


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: HELP - Cant change Include Path
    ... Here is my php.ini path for the php.ini in both php and sql dirs: ... which did work on the remote linux server and sent me some mail ... Although my gmail acct picked the mail up as ... an attachment instead of as html - but gmail is really wierd about ...
    (comp.lang.php)
  • Re: f10dvd installs but wont boot
    ... I guess i need some info in gmail how not to do that. ... Use default text encoding for outgoing messages <<selected ... nothing here explicitly HTML ...
    (Fedora)
  • Re: Example of get nVidia
    ... |> That's a feechur of Outlook. ... He is using gmail and posting from the gmail ... I'm using Gmail and as I'm typing this reply I can see "<< Plain ... I don't believe I'm posting in both html and text. ...
    (Fedora)
  • Re: "pictures could not be found" in forwarded email
    ... GMAIL views the picture without any problems. ... I open that mailbox with its online mail client, ... HTML page and right-click on the image to view its properties. ... in mail security options is unchecked, ...
    (microsoft.public.windows.vista.mail)
  • Re: HTML in WinMail
    ... I prefer to have it set the way you have it; to read all messages in plain ... It is safer, or at least I feel safer. ... I cannot get Win Mail to stay in HTML mode when reading emails. ... Well Gmail gets the stuff that I might read, but my other email gets the personal stuff. ...
    (microsoft.public.windows.vista.mail)