Jump to content

[SOLVED] PHP mail()


ShibSta

Recommended Posts

I'm sending an email using PHP and everything is working fine. However, Thunderbird is not rendering the HTML. I sent the same email to Hotmail and the HTML is shown perfectly. To further debug the issue, I sent an HTML email from Hotmail to my Thunderbird account and the HTML rendered fine. Therefore, I have reason to believe that my PHP is at fault and it's not a Thunderbird configuration that's incorrect. Here is the source of my email, do you see anything wrong with it?

 

X-Account-Key: account4

X-UIDL: UID260-1192604431

X-Mozilla-Status: 0001

X-Mozilla-Status2: 00000000

X-Mozilla-Keys:                                                                               

Return-path: <nobody@alpha.--REMOVED FOR FORUMS--.com>

Envelope-to: me@--REMOVED FOR FORUMS--.com

Delivery-date: Tue, 19 May 2009 11:10:57 -0400

Received: from nobody by alpha.--REMOVED FOR FORUMS--.com with local (Exim 4.69)

(envelope-from <nobody@alpha.--REMOVED FOR FORUMS--.com>)

id 1M6Qy1-000306-0T

for me@--REMOVED FOR FORUMS--.com; Tue, 19 May 2009 11:10:57 -0400

To: me@--REMOVED FOR FORUMS--.com

Subject: This is a test!!

MIME-Version: 1.0

Date: Tue, 19 May 2009 11:10:56 -0400

X-Priority: 3

X-MSMail-Priority: Normal

X-Mailer: PHP Mailer

From: "--REMOVED FOR FORUMS--" <support@--REMOVED FOR FORUMS--.com>

Content-Type: multipart/alternative;

boundary="----=_BASE_BOUNDRY_R3E.0B4E.2C9C0A9S8.E7E4L4DY"

Message-Id: <E1M6Qy1-000306-0T@alpha.--REMOVED FOR FORUMS--.com>

 

 

This is a MIME encoded message.

 

------=_BASE_BOUNDRY_R3E.0B4E.2C9C0A9S8.E7E4L4DY

Content-Type: text/html; charset="utf-8"

 

 

<b><a href="http://www.google.com">We have HTML capability!</a></b><br /><br /><i>But this is just a test...</i>

 

------=_BASE_BOUNDRY_R3E.0B4E.2C9C0A9S8.E7E4L4DY

Content-Type: text/plain; charset="utf-8"

 

 

We have HTML capability!

 

But this is just a test...

 

Thanks

Link to comment
Share on other sites

After further debugging, I've realized that Thunderbird is simply crying over the fact that text/html is coming before text/plain... I swapped the two and placed the text/plain first and text/html second in the mail and now everything is working.

 

Thanks anyway. :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.