By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,994 Members | 2,073 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,994 IT Pros & Developers. It's quick & easy.

"unknown date" via mail()

P: n/a
Probably something simple but all email I send via mail() is received
with an "unknown date" stamp. Am I missing something in my header?
Code as follows:

*****************************
<?php
$headers = <<<END
From: th**@email.com
Date: $date
X-Mailer: PHP v$phpversion
MIME-Version: 1.0
Content-Type: multipart/related; boundary="$boundary"
END;

$date = date("D M j G:i:s T Y");
$Email = 'm*@myemail.net';
$subject = 'Test Email';
$message = 'test message';
mail($Email,$subject,$message,$headers);
********************************

May 22 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
At Tue, 22 May 2007 10:24:25 -0700, Akhenaten let his monkeys type:
Probably something simple but all email I send via mail() is received
with an "unknown date" stamp. Am I missing something in my header?
Code as follows:

*****************************
<?php
$headers = <<<END
From: th**@email.com
Date: $date
X-Mailer: PHP v$phpversion
MIME-Version: 1.0
Content-Type: multipart/related; boundary="$boundary"
END;

$date = date("D M j G:i:s T Y");
$Email = 'm*@myemail.net';
$subject = 'Test Email';
$message = 'test message';
mail($Email,$subject,$message,$headers);
********************************
Set $date before you create the $headers. $date is empty in your example.
Sh.
May 22 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.