因此,当我提交表单时,一切都很好地存储在数据库中,我收到了一封非常简单的电子邮件,基本上包含“嘿,谢谢,这是你的链接”之类的交易,我收到了就好了。但是现在我已经升级为使用 HTML 正文,突然我没有收到电子邮件,知道为什么吗?
$to = $username;
$subject = 'Thanks for Registering on Dota Pub Stars!';
$message = '<html>
<head>
<title>Registration Successful!</title>
<link rel="stylesheet" src="http://www.sithhappens.net/css/style.css" />
</head>
<body class="bodybg">
<div id="registrationform">
<p class="success">Thanks for registering on Dota Pub Stars!</p>
<br />
<br />
<a class="button2" href="http://www.sithhappens.net/?key=' . $activation_key . '&username=' . $username . '&email=' . $email1 . '">Activate Account</a>
</div>
</body>
</html>';
$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: $from\r\n";
mail($to, $subject, $message, $headers);