Can someone tell me what's wrong with the following code. I'm trying to work around what appears to be a PHP problem on windows. I need to set the "Date:" header manually because PHP sets the wrong GMT offest.
This is what comes out in the mail. The date problem is fixed but the Reply to: header is getting killed. It looks like the "\n" 's
don't work properly ????
To: Multiple recipients of list tobandmark <tobandmark@mydomain.net> (Date: is listed twice for some reason...I guess the mail server adds a Date: also)
Sender: owner-tobandmark@mydomain.net
Reply-to: tob@mydomain.netDate: Tue, 22 Jan 2002 11:06:52 -0500
Subject: Golf Trivia Contest Entry
From: tob@mydomain.net
Date: Tue, 22 Jan 2002 11:06:53 -0500
Message-id: <20020122110653.6ad075aa696545eaa0b6fac10a742095.in@mail.golflink.net>
X-SLUIDL: 13AD60E7-EE1A4F37-9B0CC148-D1B6062D
here's the code:
$to = "tobandmark@mydomain.net";
$subject = "PHP MAIL TEST";
$mailheaders = "From: tob@mydomain.net\n";
$mailheaders .= "Reply-to: tob@mydomain.com\n\n";
$mailheaders .= "Date: ". date("r",time()) ."\n\n";
$msg="Hello";
mail("$to", $subject, $msg, $mailheaders);