如何在PHP电子邮件中添加标题?

3
使用PHP发送电子邮件时,如何更改发送的电子邮件标题,就像下面的图片中那样。

Google Email List

我希望将“联系方式”一词更改为其他内容。
这是我的当前代码:

$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 ');
              }

我需要添加另一个标题吗?
谢谢

1个回答

4
$headers  = "From: Gaming Populace < contact@gamingpopulace.com >\n";

请按照以下方式修改您的头部


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接