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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:18:03+00:00 2026-05-25T19:18:03+00:00

Im sending a mail using php, and the subject of the mail has accents.

  • 0

Im sending a mail using php, and the subject of the mail has accents.

Im receiving weird characters in Outlook instead the accented chars. If i see the email in a web email client i see the subject perfect.

This is the code that im using to send the email:

$to  = 'whateveremail@whatever.com';

$subject = '[WEBSITE] áccent – tésts';

$message = '<p>Test message</p>

$headers = 'MIME-Version: 1.0' . "\r\n";                                          

$headers.= 'From:equipothermomix@thermomix.com' . "\r\n";                                   

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

mail($to, $subject, $message , $headers);

How i could solve the issue, do i have to use another charset?

  • 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-25T19:18:03+00:00Added an answer on May 25, 2026 at 7:18 pm

    The only reliable way to send e-mail is using plain 7 bit ASCII so you need to encode strings properly when you want to use anything else. In your case, [WEBSITE] áccent – tésts should be encoded as (e.g.) =?windows-1252?B?W1dFQlNJVEVdIOFjY2VudCCWIHTpc3Rz?=, where the string splits as:

    =?windows-1252?B?W1dFQlNJVEVdIOFjY2VudCCWIHTpc3Rz?=
      ^            ^ ^
      |            | |
     Charset       | Data
                   |
                  Base64
    

    Check:

    echo base64_decode('W1dFQlNJVEVdIOFjY2VudCCWIHTpc3Rz'); // [WEBSITE] áccent – tésts
    

    This is just an example of one of the possible ways to encode non-ASCII strings.

    When sending e-mail, there are many little details like this that need attention. That’s why sooner or later you end up using a proper e-mail package like Swift Mailer or PHPMailer.

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

Sidebar

Related Questions

I have send an email using php mailer class. mail was sending successfully but
I am using swiftmailer , a library for sending mail in php. The problem
I'm sending myself a text message using PHP mail() and it says FRM: username@myftpaddress.com
I am sending a reply mail using PHP to those who send a mail
I am sending an email using PHP mail function, but I would like to
I am sending SMTP email from my PHP website, using SendGrid SMTP mail service.
i wanna write a script sending e-mail to my client automatically using php How
I'm using PHP for sending an e-mail. The values in the e-mail are depending
I am sending email newsletters using php mail() function. I have to track the
I am sending an e-mail via a PHP script. This works fine using NSMutableURLRequest

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.