1

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

$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 标签。如果我们删除表格标签,它不会发送邮件。

而且我也使用过$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>
4

1 回答 1

2

用下面替换标题并尝试..

$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";
于 2013-01-08T12:50:11.620 回答