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 1080963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:06:22+00:00 2026-05-16T22:06:22+00:00

I am using MAMP (LAMP stack development environment) to send emails using PHP. The

  • 0

I am using MAMP (LAMP stack development environment) to send emails using PHP.

The code is below:

$out_message = '
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>You have requested an appointment with the Smile Zone</title>
</head>

<body>
<p style="font-family:Arial, Helvetica, sans-serif;"><strong>Dear '.$details_name.'</strong></p>
<p style="font-family:Arial, Helvetica, sans-serif">You have requested an appointment!</p>
<p style="padding:10px;"><strong>Please note that this appointment is currently unconfirmed</strong></p>
</body>
</html>
';

//now for the client side:
$out_to = 'john@gmail.com';
$out_subject = 'My Subject';

// 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: John <john@gmail.com> \r\n";
$headers .= 'From: The Smile Zone <noreply@smile-zone.com>' . "\r\n";

$success2 = mail($out_to, $out_subject, $out_message, $headers);

When I send this email and view in Apple Mail, it appears as it should, however in GMail, in the browser all I get is the raw source.

Why is this?

  • 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-05-16T22:06:22+00:00Added an answer on May 16, 2026 at 10:06 pm

    You have conflicting charsets:

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    

    and:

    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    

    Change them to match.

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

Sidebar

Related Questions

I'm using MAMP just for my development environment and haven't really understood the folder
I am using MAMP to host a website. I have index.html and index.php both
i've created an rss feed in php using the below code. i've double checked
I'm using gettext in a MAMP environment. I have locale files for es_ES ,
I am using Codeigniter & LAMP stack (without the MySQL) on my localhost to
i'm using MAMP on my MacBook Pro as a local server. PHP and MySql
I am currently using mamp pro on osx for local development and I want
I'm following a tutorial to send emails using gmail, however what I get is
I'm building a site on my home computer using MAMP. The code I'm using
I'm developing an application using CodeIgniter on a MAMP server (for development, live it'll

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.