By default, PHP will send e-mail from the account you are running the script from. Usually this is in the format of:
To ensure the From: address displays correctly to your users, please ensure you are sending the return-path, reply-to and from headers with the mail() function. More information can be found from the PHP website. The following code has been tested to work successfully on our shared servers. Please be advised we do NOT support this code, and we will not help you with development of your mail scripts. The code shown is merely an illustration of correct header configuration:
$to = "firstname.lastname@example.org";
$subject = "Testing From Address";
$message = "This is a test, please disregard.";
$headers .= 'Return-Path: email@example.com' ."\r\n";
$headers .= 'From: Sender <firstname.lastname@example.org>' . "\r\n";
mail($to, $subject, $message, $headers);
In addition to the above, to "fix" the return-path header you will also need to invoke the mail() function with an extra "-f" parameter as such:
mail($to, $subject, $message, $headers, "-email@example.com");
Please note that if using Microsoft Outlook, or Hotmail (Live), you will see something similar to:
"From firstname.lastname@example.org on behalf of email@example.com"
This is normal behaviour, and unavoidable due to the way our servers add the Sender header to all e-mails for abuse tracking purposes. Other clients and companies (such as Google Apps) utilise the From header for sender sourcing, so do not exhibit this behaviour.