Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.