note 17817 deleted from ref.mail by jimw

From: Date: Wed, 02 Jan 2002 01:46:16 +0000
Subject: note 17817 deleted from ref.mail by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24106@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.

« previous php.notes (#24106) next »