使用php发送电子邮件时,如何更改已发送的电子邮件的标题,如下图所示。
我想将“联系”一词改为其他内容 这是我目前的代码:
$msg = "Thank you, " ."$inputUsername". ", for joining "."<a href='http://www.gamingpopulace.com'>Gaming Populace!</a> "."We hope that you enjoy the site and become very active." ;
$topic = "Thanks for joining";
$headers = "From: contact@gamingpopulace.com";
$headers .= "\r\nReply-To: contact@gamingpopulace.com\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1";
$email = preg_replace("([\r\n])", "", $email);
if (mail($email,$topic,$msg, $headers)) {
header('Location: ../index ');
}else {
header('Location: ../index ');
}
我是否需要添加另一个标题? 感谢
答案 0 :(得分:2)
$headers = "From: Gaming Populace < contact@gamingpopulace.com >\n";
像这样修改标题