Jump to content

PHP Mail - "Sent" time is blank


tekrscom

Recommended Posts

Hey everybody...

 

For some reason or another, which I can't seem to find any information about, when I send an email from a PHP form on my website, the email arrives in Outlook without a "Sent" time in the email "Reading Pane" header, unlike every other email that I have received... So I am wondering, what could possibly cause this, since ONLY these emails do this?

 

Here's my PHP Mail code... Thanks in advance for any help...

$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$EmailFromEmailAddress."\r\n";
$headers .= "Bcc: ".$EmailBccEmailAddress."\r\n";
//$headers .= "From: \"".$EmailFromName."\" <".$EmailFromEmailAddress.">\n";
//$headers .= "To: \"".$EmailToName."\" <".$EmailToEmailAddress.">\n";
//$headers .= "Bcc: \"".$EmailBccName."\" <".$EmailBccEmailAddress.">\n";

mail($EmailToEmailAddress, $EmailSubject, $EmailBody, $headers);

 

Edit:

Forgot to mention what PHP version I have... Here you go...

PHP Version 5.2.9

Link to comment
https://forums.phpfreaks.com/topic/195731-php-mail-sent-time-is-blank/
Share on other sites

$ft=date("m-d-Y h:i a");

$headers .= "From: ".$EmailFromEmailAddress $ft."\r\n";

 

It wouldn't accept the syntax the way it was, so I had to change it to this... But then when I tested it with the change, it just had the date after the From in the email... Did I do the wrong thing with your code, should it have been changed a different way?

$ft=date("m-d-Y h:i a");
$headers .= "From: ".$EmailFromEmailAddress." ".$ft."\r\n";

I have no idea. $ft output is this:

03-18-2010 03:46 pm

but why dont you try:

$headers .= "From:  $EmailFromEmailAddress at $ft \r\n";

you are using double quotes so there is really no need to break the echo

works for me.

 

 

HTH

Teamatomic

I have no idea. $ft output is this:

03-18-2010 03:46 pm

but why dont you try:

$headers .= "From:  $EmailFromEmailAddress at $ft \r\n";

you are using double quotes so there is really no need to break the echo

works for me.

 

Tried it, still doesn't work, all it does is tack on the date to the end of the From, in the email... I did notice however, that the autoresponse emails from PHPFreaks, does the exact same thing... must be something to do with PHP Mail going to Outlook...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.