Jump to content

[SOLVED] "From" Header in mail()


A.White.89

Recommended Posts

I am working on sending an email to people using the php mail() function.

 

So far, I have everything working great except that the received email has a large server address in the "From" column that won't change with the header, "From: person" .

 

 

Here is an example of what I'm talking about:

$recipient = '[email protected]';
$subject = 'email subject';
$message = 'email message...';
$header = 'From: InsertName\r\n';

mail($recipient, $subject, $message, $header);

 

Everything in this example works correctly except the header.  Any suggestions why this isn't working and how it can be fixed?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/151351-solved-from-header-in-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.