Reputation: 85
When sending an email with php, how can I change the title of an email that gets sent, such as in the picture below.
I want to change the word "contact" to something else.
Here is my current code:
$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: [email protected]";
$headers .= "\r\nReply-To: [email protected]\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 ');
}
Do I need to add another header?
Thanks
Upvotes: 3
Views: 1928
Reputation: 2215
$headers = "From: Gaming Populace < [email protected] >\n";
Modify your header like this
Upvotes: 4