note 17817 added to ref.mail
| From: | musawir at ali dot tf | Date: | Thu, 27 Dec 2001 01:08:55 +0000 |
| Subject: | note 17817 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-23850@lists.php.net to get a copy of this message | ||
I encountered a problem with Microsoft email clients. When you use the mail() function (alteast when
on a UNIX server), the "Date Sent" field is blank. That created a problem for our clients
who are used to sort emails by the date recieved.
To overcome this, you need to specify the "Date" header in a special format. Adding the
following code will make it work.
$date = date("D, j M Y H:i:s O");
$headers = "Date: ".$date."\r\n";
$emailto = "musawir@ali.tf";
mail(emailto,"Hello","Check the date please.",$headers);
You can add extra headers by just concatenating to the $headers string variable.
--
http://www.php.net/manual/en/ref.mail.php
http://master.php.net/manage/user-notes.php?action=edit+17817
http://master.php.net/manage/user-notes.php?action=delete+17817
http://master.php.net/manage/user-notes.php?action=reject+17817