$to ="$email";
$from ="mina nasser <mark@yahoo.com>";
$subject ="Login Password Generated";
$message="<br />New Login Password <br />
activate Your New Password for our site is:<u>$temp_pass</u><br />";
$headers ="from:{$from}\r\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail($to, $subject, $message, $headers);
请某人帮帮我
答案 0 :(得分:2)
$message='<br />New Login Password <br />
activate Your New Password for our site is:<u>$temp_pass</u><br />';
应该用双引号将$temp_pass
解析为变量
$message="<br />New Login Password <br />
activate Your New Password for our site is:<u>{$temp_pass}</u><br />";
答案 1 :(得分:0)
mail()
是返回true还是false。设置日期标题。
$headers .= 'Date: ' . date(DATE_RFC2822);