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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:30:14+00:00 2026-05-27T13:30:14+00:00

I have the following headers for emails sent with phpmailer: $headers = ‘From: ‘

  • 0

I have the following headers for emails sent with phpmailer:

    $headers = 'From: ' . $from . "\n";
    $headers .= 'MIME-Version: 1.0' . "\n";
    $headers .= 'Content-Type: text/html; charset=iso-8859-1' . "\r\n";
    $subject = EMAIL_SUBJECT ;

I pass them like this (standard it seems…):

    mail(EMAIL_TO, $subject , stripslashes($message), $headers);

As a result my mail is perfectly sent the subject from etc appear but in the main body of the message before the html starts, I get:

Message-Id: Date: Thu, 8 Dec 2011 08:55:33 +0100 (CET) Return-Path: my@email.org X-OriginalArrivalTime: 08 Dec 2011 08:04:43.0526 (UTC) FILETIME=[0B336260:01CCB580]

I could not get rid of it. thank you.

  • 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-27T13:30:15+00:00Added an answer on May 27, 2026 at 1:30 pm

    I modified the code as follow:

    $headers = 'MIME-Version: 1.0' . "\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
    $headers .= 'From: ' . $from . "\n";
    

    Notice, I removed the \r of the Content-type line and changed the order of the headers.

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

Sidebar

Related Questions

I'm using PHP mail and I have the following headers: MIME-Version: 1.0 Content-Type: text/html;
i have the following code $subject = Subject Here; $headers = 'MIME-Version: 1.0' .
So I have the following code. It's supposed to send HTML emails that were
I have the following html code: <h3 id=headerid><span onclick=expandCollapse('headerid')>&uArr;</span>Header title</h3> I would like to
Let's say I have the following HTML: <table id=foo> <th class=sortasc>Header</th> </table> <table id=bar>
I have C header file containing the following type definition: // example.h typedef struct
I have a header.html which start with session_start();. Then the following code, $_SESSION['cart'][$sw_id] is
I'm using the PHP native mail() function to send HTML emails and have a
On our mailing application we are sending emails with the following header: FROM: marketing@customer.com
I have the following code, which sends emails but it is embedding one email

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.