7 Feb 2010, 3:12pm
php:
by bseanvt

leave a comment

Using the PHP Mail Function with Additional Headers

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);