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

  • SEARCH
  • Home
  • 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 7998801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:19:11+00:00 2026-06-04T15:19:11+00:00

I made script that sends html email messages to users. However, in Gmail, I

  • 0

I made script that sends html email messages to users. However, in Gmail, I can’t seem to get the font color working. It works for the first message, but the next messages in the conversation are all displayed in purple.

It only happens when I get the strings from .txt files using file_get_Contents()). If I fill the variables with strings from within my class or enter the message directly rather than using variables gmail displays the html normally. I haven’t found any problems with other webmail or mail clients. For the actual sending of the mail I tried both phpmailer and the regular mail() function.

    $message = "<html><body><font face='Georgia, Times' color='red'>";
    $message .= "<p>Beste " . $this->name . "</p>";
    $message .= "<p>" . $parPersonal . "</p>";
    $message .= "<p>" . $parOne . "</p>";
    $message .= "<p>" . $parTwo . "</p>";
    $message .= "<p>" . $parThree . "</p></font></body></html>";

A screenshot from gmail:

https://imgur.com/h8cLL

On a side note, this script will usually only send 1 email to 1 person at a time and this problem shouldn’t appear, it is currently just mailing to my own gmail account for testing purposes. However, I’m extremely curious how I can fix this for future purposes.

  • 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-04T15:19:13+00:00Added an answer on June 4, 2026 at 3:19 pm

    Most likely this is due to the improper nesting of the <font> tag.

    The <font> tag is an inline element, which should be nested inside your block elements such as the <p> tags.

    This leads to very messy HTML, but such is the lot with the rather archaic html engines used by email clients.

    You can get good coverage these days using inline styles in your elements (but separate <style> blocks are still poorly covered). See this great resource from CampaignMonitor for what you can use : http://www.campaignmonitor.com/css/

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

Sidebar

Related Questions

I made a script that spawns a remote shell or runs a local shell
i made a script that dynamically loads content into a div and whenever the
I have made a script that uses a program called Diascope, its a video
What happes when the script that made @mysql_connect($server, $user, $password) dies? How long does
I made this Greasemonkey script: var maxpi = 250; var p1 = /html/body/div/div[2]/div/div[2]/table[2]/tbody/tr[1]/td[11]; var
So I have a validation script I made a while ago. I can pass
I made a script (using mootools library) that is supposed to overlay an image
I made a script before, that worked completely fine in PHP 5.2. But when
We made a script that automatically opens the Microsoft Outlook new mail window. Some
I'm having issues with a script that I made for use in HTML5. Here

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.