WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] two different mails from the same sendmail

[Resolved] two different mails from the same sendmail

  • kanika

    @kanikawordpresscom

    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t know , but someone may be, your problem is big 😀

    kanika

    @kanikawordpresscom

    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

    @kanikawordpresscom

    Thank you,

    the code above works.

    You are welcome. Glad it worked for you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] two different mails from the same sendmail’ is closed to new replies.
Skip to toolbar