Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8965561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:49:54+00:00 2026-06-15T16:49:54+00:00

I’ve searched a lot but could not find any solutions for this. after changing

  • 0

I’ve searched a lot but could not find any solutions for this.
after changing my code for hours i tried the example from php.net and it acts the same.

if i send it to my gmail address everything look fine,
if i send it to another server it does not render it as html.
i tried about 8 servers and 4 suffer from this issue

this is the code (php example):

// subject
$subject = 'Birthday Reminders for August';

// message
$message = '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
    <tr>
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
      <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
    </tr>
    <tr>
      <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
  </table>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

// Mail it
mail($to, $subject, $message, $headers);
?>

this is the “show original” from gmail (gmail is only the client, mail comes from php server), message is not displayed correctly – html is raw:

Delivered-To: XXX
Received: by 10.220.35.74 with SMTP id o10csp285028vcd;
        Sun, 9 Dec 2012 03:18:35 -0800 (PST)
Received: by 10.220.238.139 with SMTP id ks11mr6865773vcb.49.1355051914996;
        Sun, 09 Dec 2012 03:18:34 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning             unknown does not designate 82.80.232.249 as permitted sender) client-ip=82.80.232.249;
Received: by 10.230.67.134 with POP3 id r6mf4415353vbi.4;
            Sun, 09 Dec 2012 03:18:34 -0800 (PST)
X-Gmail-Fetch-Info: gideon@example.com 5 mail.example.com 110 gideon@example.com
Received: from [82.80.232.249] by mail.example.com (ArGoSoft Mail Server .NET v.1.0.8.4)         with ESMTP (EHLO web9.wishosting.net)
    for <gideon@example.com>; Sun, 09 Dec 2012 13:18:02 +0200
Received: by web9.wishosting.net (Postfix, from userid 1168)
    id C82D03EE2EC; Sun,  9 Dec 2012 13:18:23 +0200 (IST)
        To: gideon@example.com, wez@example.com
Subject: Birthday Reminders for August
    X-PHP-Script: example.com/lp/mailtest.php for 89.139.28.204
MIME-Version: 1.0
Date: Sun, 09 Dec 2012 13:18:02 +0200
Message-ID: <x0otq4xc1dcboohp09122012011802@EAWEB1>
SPF-Received: none
X-FromIP: 82.80.232.249
From: gideon@example.com

Content-type: text/html; charset=iso-8859-1

To: Mary <mary@example.com>, Kelly <kelly@example.com>

From: Birthday Reminder <birthday@example.com>

Cc: birthdayarchive@example.com

Message-Id: <20121209111823.C82D03EE2EC@web9.wishosting.net>
Date: Sun,  9 Dec 2012 13:18:23 +0200 (IST)



    <html>
    <head>
      <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
    <tr>
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
              <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
            </tr>
    <tr>
          <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
      </table>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:49:56+00:00Added an answer on June 15, 2026 at 4:49 pm

    Ivan’s comment is correct!

    Try below example which uses phpmailer lib.

    <?php
    //phpmailer lib
    require_once 'class.phpmailer.php';
    
    $mail = new PHPMailer(true); 
    
    try {
        $mail->AddAddress('mary@example.com', 'Mary');
        $mail->AddAddress('kelly@example.com', 'Kelly');
        $mail->SetFrom('birthday@example.com', 'Birthday Reminder');
        $mail->AddReplyTo('no-reply@example.com', 'No-reply');
        $mail->Subject = 'Birthday Reminders for August';
        $mail->AltBody = 'Here are the birthdays upcoming in August!\nPerson:Joe BirthDay:3rd Aug 1970\nPerson:Sally BirthDay:17th Aug 1973\n'; 
        $mail->MsgHTML('
            <p>Here are the birthdays upcoming in August!</p>
            <table>
                <tr>
                  <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
                </tr>
                <tr>
                  <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
                </tr>
                <tr>
                  <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
                </tr>
            </table>'
        );
    
        $mail->Send();
    
        echo "Message Sent OK<p></p>\n";
    } catch (phpmailerException $e) {
        echo $e->errorMessage(); 
    } catch (Exception $e) {
        echo $e->getMessage(); 
    }
    ?>
    

    PHPMailer can be downloaded from https://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

    Samples located in https://code.google.com/a/apache-extras.org/p/phpmailer/wiki/ExamplesPage

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
For some reason, after submitting a string like this Jack’s Spindle from a text
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I know there's a lot of other questions out there that deal with this
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.