Fat Galah NewsFat Galah NewsFat Galah BlogFat Galah Client LoginFat Galah Client Contact Details
Fat Galah Internet Design Studios
103 Burrendah Road, Jindalee, QLD

Local call: 1800 99 33 99 (Australia Only)
International Ph: +61 7 3715 5999
Ph: 07 37155999

How to get your Email Header working

November 9th, 2009

Having trouble getting your email to work. Headers play a big part of the mail function. I set an example.

$eol="\n";
$fromAddress = 'test@testing.com.au';
$fromName = 'Company Name';

$headers = 'MIME-Version: 1.0'.$eol;
$headers .= "Content-type: text/html; charset=iso-8859-1".$eol;
$headers .= "From: ".$fromName."<".$fromAddress.">".$eol;
$headers .= "Reply-To: ".$fromName."<".$fromAddress.">".$eol;
$headers .= "Return-Path: ".$fromName."<".$fromAddress.">".$eol; // these two to set reply address
$headers .= "Message-ID: <".time()."-".$fromAddress.">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol;
mail($to, $subject, $msg, $headers);

 

Leave A Comment:

Name:(Required)
XHTML ValidationCSS Validation