kanika
Member
Posted 9 months ago #
Hi,
I tried using the send-from plugin to change the send-from name. But from the contact-us form(which is customized), it still comes as message-noreply.
The function called is in email.php where the code looks like:
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: message-noreply@example.com\r\n";
$headers .= "BCC:";
$headers .= $emailBcc;
$headers .= "\r\n";
if(@mail($recipient, $subject, $mailBody, $headers))
{
return TRUE;
}
else
{
return FALSE;
}
How can I change the From name?
wildlandart
Member
Posted 9 months ago #
I don't know , but someone may be, your problem is big :D
kanika
Member
Posted 9 months ago #
By the way I forgot to add that i had tried editing this file and changing the from header
From: XYZ<message-noreply@example.com>\r\n
It didnt work.
I had thought that the from name header would be different bit apparently it isnt.
As far as the problem is concerned, i dont know how big or small it is. If u wish, you can make fun of that one. :)
thanks,
Kanika.
See if this works
$headers .= "From: message-noreply@example.com X-Mailer: PHP/" . phpversion();
also check with your host if CC and BCC is blocked to prevent spam.
kanika
Member
Posted 9 months ago #
Thank you,
the code above works.
You are welcome. Glad it worked for you.