在PHP电子邮件中使用HTML代码[重复]

This question is an exact duplicate of:

Is there any way I can put HTML code in Email message and Auto Response message? When I'm trying the email output it with HTML code too.

   if ($_SERVER['REQUEST_METHOD'] == 'POST'){
  $mailto = 'info@website.com';
  $mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
  $subject = 'Email Subject';
  $message = 'Hello, Email message...'; // Want to try something like '<Strong>Hello</strong> Email message...'
  $success_url = './success.php';
  $error_url = './failed.php';
  $error = '';
  $autoresponder_from = 'noreply@website.com';
  $autoresponder_subject = 'Auto Response Subject';
  $autoresponder_message = 'Hello John, Thank you.'; // Want to try something like '<Strong>Hello John</strong> Thank you.'
</div>

You need to set the correct header for html emails

have a look at Example #4: http://www.php.net/manual/en/function.mail.php

PHP

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

Don't forget to add a plain copy of your message