Author Topic: PHP Mail - "Sent" time is blank  (Read 294 times)

0 Members and 1 Guest are viewing this topic.

Offline tekrscomTopic starter

  • Enthusiast
  • Posts: 112
    • View Profile
PHP Mail - "Sent" time is blank
« on: March 18, 2010, 03:46:46 PM »
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
« Last Edit: March 18, 2010, 03:49:14 PM by tekrscom »

Offline teamatomic

  • Devotee
  • Posts: 1,197
  • Gender: Male
  • fat skis rule!
    • View Profile
    • myPHPtemplate
Re: PHP Mail - "Sent" time is blank
« Reply #1 on: March 18, 2010, 04:11:18 PM »
$ft=date("m-d-Y h:i a");
$headers .= "From: ".$EmailFromEmailAddress $ft."\r\n";


HTH
Teamatomic
when in doubt...ski fast
when scared...ski faster
when terrified...point em down

Offline tekrscomTopic starter

  • Enthusiast
  • Posts: 112
    • View Profile
Re: PHP Mail - "Sent" time is blank
« Reply #2 on: March 18, 2010, 04:19:27 PM »
$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";

Offline teamatomic

  • Devotee
  • Posts: 1,197
  • Gender: Male
  • fat skis rule!
    • View Profile
    • myPHPtemplate
Re: PHP Mail - "Sent" time is blank
« Reply #3 on: March 18, 2010, 04:54:34 PM »
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
when in doubt...ski fast
when scared...ski faster
when terrified...point em down

Offline tekrscomTopic starter

  • Enthusiast
  • Posts: 112
    • View Profile
Re: PHP Mail - "Sent" time is blank
« Reply #4 on: March 18, 2010, 05:00:20 PM »
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...