[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

using php mail() is there a way to changed the time

using php mail() is there a way to changed the time that the mail is sent

I notice that a mail which gmail considers a new mail but the date (year) is 1969
0
rgb192
Asked:
rgb192
  • 2
1 Solution
 
Scott MadeiraCommented:
If the year is 1969 then that means there was probably no date set in the message by the mail server.

Dates are managed by the mail server and not the php mail() function.  I'd start looking at the sending server and go from there.
0
 
hernst42Commented:
You can add the Date-Header to your message. This field is typical use by the Mail clients to display thje date of the mail.


mail('user@example.com', 'Subject', 'Body', 'Date: Fri, 22 Apr 2011 00:17:10 +0200');

Open in new window

0
 
rgb192Author Commented:
i tried
mail('user@example.com', 'Subject', 'Body', 'Date: Fri, 22 Apr 2011 00:17:10 +0200');


and in gmail the date was not changed
0
 
rgb192Author Commented:
thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now