Page 1 of 1

emails sent via php taking a long time

Posted: Fri Mar 06, 2009 10:06 pm
by oboedrew
Here's another email question for all you php gurus. I'm setting up a "contact me" form on my website for the first time, and the test messages I send to myself through this form take a long time to show up in my inbox. Sometimes a few hours, sometimes a day or two. Is it normal for messages sent via php's mail function to take so long to arrive? Or is this perhaps a server problem?

Thanks,
Drew

Re: emails sent via php taking a long time

Posted: Fri Mar 06, 2009 10:10 pm
by Benjamin
Is this a shared hosting setup? There may be a large mail query causing your message to just wait in line.

Re: emails sent via php taking a long time

Posted: Fri Mar 06, 2009 10:21 pm
by oboedrew
What exactly is a "shared hosting setup?" I don't have my own server, if that's what you mean, so I use a remote web host. Is this sort of email traffic jam common in such cases?

Thanks,
Drew

Re: emails sent via php taking a long time

Posted: Fri Mar 06, 2009 10:22 pm
by Benjamin
Shared hosting means that there are many other sites on the same server. There is a good chance that the host is routing the mail from all the sites, even sites on other servers through a common mail server. That mail server may be running behind due to the load. I would ask your host about it.

Re: emails sent via php taking a long time

Posted: Sat Mar 07, 2009 12:20 pm
by oboedrew
Well, I sent an email to my host to get their take on the issue. Meanwhile, I'd like to know if this is a typical (perhaps even inevitable) problem with shared hosting. Does everyone who doesn't have their own server have to deal with such a delay? Or is this perhaps a good reason to start looking for a new hosting company?

Thanks,
Drew