Written by Sean Behan on Sun Jun 17th 2012

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

<?php
$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 with..
#email #function #headers #php

Just finishing up brewing up some fresh ground comments...