Mail() Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
blodder24
Forum Newbie
Posts: 7
Joined: Wed Nov 26, 2008 4:18 pm

Mail() Question

Post by blodder24 »

I am using Godaddy as a server, and am having two issues with the mail function.

1. When I receive an email it says it was sent at 12:00:00 AM. My header is: $headers .= 'Date:' .date("D M j"). "\r\n";

2. Sometimes the emails take up to 4 hours to send. I contacted Godaddy & they said it shouldn't take more than 1 hour.

Any suggestions? Thanks in advance!
machinehead933
Forum Newbie
Posts: 7
Joined: Tue Jan 20, 2009 10:48 pm

Re: Mail() Question

Post by machinehead933 »

Can you please post the headers of one of the received messages that was delayed?
blodder24
Forum Newbie
Posts: 7
Joined: Wed Nov 26, 2008 4:18 pm

Re: Mail() Question

Post by blodder24 »

* from lmtpproxyd (mail.umich.edu [141.211.14.96]) by thisboyslife.mail.umich.edu (Cyrus v2.3.13) with LMTPA; Wed, 21 Jan 2009 06:31:02 -0500
* from deliver ([unix socket]) by mail.umich.edu (Cyrus v2.3.13) with LMTPA; Wed, 21 Jan 2009 06:31:02 -0500
* from firestarter.mr.itd.umich.edu (firestarter.mr.itd.umich.edu [141.211.14.83]) by awakenings.mail.umich.edu () with ESMTP id n0LBV13G003267 for <mines@mail.umich.edu>; Wed, 21 Jan 2009 06:31:01 -0500
* FROM p3nlsmtp02.shr.prod.phx3.secureserver.net (p3nlsmtp02.shr.prod.phx3.secureserver.net [72.167.234.226]) BY firestarter.mr.itd.umich.edu ID 49770773.7D2D8.3924 ; 21 Jan 2009 06:30:59 -0500
* (qmail 19791 invoked from network); 21 Jan 2009 11:23:49 -0000
* from unknown (HELO p3nlhssl003.shr.prod.phx3.secureserver.net) ([72.167.232.72]) (envelope-sender <hmnut@p3nlhssl003.shr.prod.phx3.secureserver.net>) by p3nlsmtp02.shr.prod.phx3.secureserver.net (qmail-ldap-1.03) with SMTP for <mines@umich.edu>; 21 Jan 2009 11:23:49 -0000
* from p3nlhssl003.shr.prod.phx3.secureserver.net (localhost [127.0.0.1]) by p3nlhssl003.shr.prod.phx3.secureserver.net (8.13.8/8.12.11) with ESMTP id n0L7C4Eh009069 for <mines@umich.edu>; Wed, 21 Jan 2009 00:12:04 -0700
* (from hmnut@localhost) by p3nlhssl003.shr.prod.phx3.secureserver.net (8.13.8/8.12.11/Submit) id n0L7C3th009063; Wed, 21 Jan 2009 00:12:03 -0700
machinehead933
Forum Newbie
Posts: 7
Joined: Tue Jan 20, 2009 10:48 pm

Re: Mail() Question

Post by machinehead933 »

Hi blodder,

If you examine the headers and normalize the timestamps, you'll see the delay took place within GoDaddy's mailservers. The timestamps in a mail header start with the most recent at the top, going down the header to wherever the mail started. The easiest way to figure this out is to determine where the mail was at each hop, using the destination mailserver's timezone as a reference. Your destination mailserver in this case is in GMT -5

So your mail was generated @localhost, sent to p3nlhssl003.shr.prod.phx3.secureserver.net at Wed, 21 Jan 2009 00:12:03 -0700, which is 02:12a GMT-5

Next hop: p3nlhssl003.shr.prod.phx3.secureserver.net 00:12:04 -0700 (02:12a GMT -5)
Next hop: p3nlsmtp02.shr.prod.phx3.secureserver.net 11:23:49 -0000 (06:23a GMT -5)

So here's the delay ... these hops are both GoDaddy mailservers, but you'll see it took 4 hours before it got from one server to the next. Something got junked up there. The most likely reason for this delay is that they just had a larger than normal outbound mail queue. It is generally nothing to be worried about unless it starts happening consistently. If you are still having trouble with this and your delayed email headers are all showing the same thing, you should go ahead and open a ticket with GoDaddy technical support to have them sort it out.
Post Reply