my configuration is PHP4.0.6 + Apache1.3.20 + RedHat7.0: I used mail() to send email, this function works well but how to change the from email address(sender email address)? now sender email address of all emails sent from this functions are always nobody@localhost.localdomain Thx!
Try out this syntax.Replace the names with your own.
$from = "From: webmaster@omnibis.com";
mail("nobody@aol.com", "the subject", $message,$from);
sorry, it does not work $from only appear as a part of email body...
Sorry! Your script works, previous message is wrong