Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm sending emails by PHP method mail() and every time it takes 20-40 seconds to produce a result. Looks like my server (sendmail) is configured to synchronous sending of emails. That's why the PHP script has to wait..

How can I fix it? Thanks!

share|improve this question
up vote 1 down vote accepted

Sendmail does not do synchronous sending of emails. The most common problem is delays in doing DNS lookups. It may also be delays in doing verification of some of the data you are supplying. Sendmail is likely verifying: the address provided in the HELO message, the email address the mail is supposed to be coming from, or the destination address. Try running an email session using telnet from your web server. You should see where the delay is quickly.

share|improve this answer
Thanks, you're right and I've fixed the problem! – yegor256 Jun 7 '10 at 8:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.