email headers - X-Mailer的邮件功能:PHP/'. Phpversion()不支持内容类型


email headers - Mail functionality with X-Mailer: PHP/' . phpversion() is not supporting content type html

在我的注册页面中,我使用了下面的邮件内容编码:

$to =$email;
$subject = "Welcome to our site. Verify your Email address";
$body= "<table>
Dear $firstname $lastname,

Welcome to site name!
You have signed up for a new user account at JumpingEyes.  Please click the following activation link to complete your user registration process.
Your Email: $email
Activation Link:
<
$jeob->urlpath/activelink.php?status=1&mailid=$email
> 
Please Note: If you encounter any problems clicking on this link, please try typing it manually into your browser. Once you have been authenticated, you will have access to your account.
Sincerely,

site Team
*This is a system generated email - PLEASE DO NOT reply to this email*</table>";
$headers = 'From: usersupport@JumpingEyes.com' . "'r'n" .
    'X-Mailer: PHP/' . phpversion();
mail($to,$subject,$body,$headers);
        $display = "<div class='error'>Thank you for creating a new account with JumpingEyes.com.  A confirmation email has been sent to $email for you to activate your new account<br><span style='font-size:12px;font-weight:normal;'><a href='index.php'>Continue....</span></a></div>";

如果我们收到邮件,它显示以下输出,它不考虑html标记。如果我们删除table标签,它就不会发送邮件。

我还使用了$headers[] = "Content-type: text/plain; charset=iso-8859-1";,但之后邮件功能不工作。任何人都可以帮我解决这个问题。

<table>
Dear Nandhu D,
Welcome to site!
You have signed up for a new user account at JumpingEyes.  Please click the following activation link to complete your user registration process.
Your Email: rithikapsks@gmail.com
Activation Link:
<
http://domain.com//activelink.php?status=1&mailid=rithika@gmail.com
>
Please Note: If you encounter any problems clicking on this link, please try typing it manually into your browser. Once you have been authenticated, you will have access to your account.
Sincerely,
siteTeam
*This is a system generated email - PLEASE DO NOT reply to this email*</table>

将标题替换为下面并尝试…

$headers  = 'MIME-Version: 1.0' . "'r'n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "'r'n";
$headers .= 'From: Mailer <mailer@example.com>' . "'r'n";