This is a discussion on "Email delay using PHP" within the PHP Forum section. This forum, and the thread "Email delay using PHP are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Email delay using PHP
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Email delay using PHP
Does anyone know why I am getting an email delay using php. I made a form to email me comments in php and theres a massive delay of up to 2 hours from when I send the email to when its recieved by the pop3 box. The email address is being sent to an internal email address (i.e. an address on the same domain as that thats sending the message). I asked the hosting why the delay is occuring and they say the script is fine and the problem is with the pop3 box picking the message up, they told me they would get their engineers to sort this but then sent me a huge free script they got from somewhere in perl and told me to use this, adapting the parts that need adapting (when i know nothing about perl). They say this will work but i can't even get the file to be displayed (i uploaded to cgi-bin and set permissions to 755 but i get an error saying cgi may not be enabled)
|
|
|
|
|||
|
Re: Email delay using PHP
If I was trying to sort this out, the first thing I would do is to look at the raw email headers on a delayed email and see if I could work out where the delay is occurring. Although you describe the email as being an "internal" one, it's quite likely that you're using an external or world-visible mail and web server, and your emails that you think are local may have some quite complex routing.
--Graham |
|
|||
|
Re: Email delay using PHP
Hi,
What would I be looking for in the headers? The reason I think its internal is because if i change the destination address to an external one, it works instantly and the person I spoke to at the hosting said it was being sent imediately but the delay was happening in the pop3 box collecting it. Also if I send an email to the destination address via an outside address I recieve it immediately At the minute im using mail(), is there another method you think would be better? Any help is much appreciated. Last edited by djme; Jan 29th, 2006 at 11:46. |
|
|||
|
Re: Email delay using PHP
mail() is the right function to use.
As I don't know your full setup I can't comment in the exact place where the mail is getting stuck ... but you also ask about reading the headers. Here's an example:
the email left the system of origin at 09:18:50 it was passed on to the next system at 09:18:57 (but there was a 9 hour time zone change) it seems to have stuck there for a few minutes as the next receipt is 09:23:59 and it rapidly moved on the final step at 09:24:02 so I can tell that the delay of 6 minutes was caused in Germany. Knowing where the problem is then lets me get onto fixing it, or to doing something about the mail routing to avoid that system - I could do that by moving my sheepbingo mail forwarder, for example. |
|
|||
|
Re: Email delay using PHP
djme - hope you can make sense of my previous post. The forum software here has chosen to edit the code reported email header to remove email addresses which, as I was talking about email forwarding and addresses, obfuscates my point!
|
|
|||
|
Re: Email delay using PHP
Yes thanks, i think I got the main points.
Once Ive located the delay, how would I go about setting up a different forwarder. The delay on mines about 2 hours so its quite unacceptable. Thanks for the help |
|
|||
|
Re: Email delay using PHP
HI Graham,
Ive looked at the header and it seems to be direct pretty much with it saying recieved by.... at 9.00, recieved by..... at 10.12, so it looks like the delay is here, is there anything I can do about this |
![]() |
| Tags |
| email, delay, using, php |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| jasonjkd | Web Page Design | 9 | Nov 12th, 2007 22:36 | |
| Reducing Pre-Load delay | ClrWtrDsgnr | Flash & Multimedia Forum | 8 | Oct 18th, 2007 20:48 |
| PHP email form not sending email | Kurt | PHP Forum | 1 | Oct 12th, 2007 04:26 |
| Form submits to email via php, but email is blank!!?? | DH1234 | PHP Forum | 2 | Jun 18th, 2007 10:42 |
| Rollover delay problem, please help! | stealthmonkey | JavaScript Forum | 11 | Feb 12th, 2006 02:24 |