Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app

Using the PHP Mail Function with Additional Headers


Pass a fourth parameter to the mail() function with the header information.

$to = "jane@example.com";
$subject = "Hello World!";
$body = "This will be sent from email-addr@example.com";
$headers = "From: email-addr@example.com\r\nX-Mailer: php";
mail($to, $subject, $body, $headers);

Tagged w/ #email #function #headersphp