2

I have a simple Wordpress site with the Contact Form 7 plugin. When submitting a form via the site it can takes in excess of 30 seconds to process.

Contact 7 uses Sendmail to deliver the emails (to an external address). Form submission never fails (but is very slow), the rest of the site is fine speed-wise.

Is there a way to profile Sendmail to find out what is taking so long?

The address it its sending to is a Google Mail account and always gets through.

1
  • First question is - are you 100% sure that it's sendmail that's being slow? Can/have you perform some debugging on the plugin script to see that it's not hanging on a DB reference or something? Commented Aug 24, 2009 at 21:27

3 Answers 3

2

Please see this answer, it was a FQDN problem.

1

if you can watch the mail logs in real time, you will see the time between the mail gets into queue and it is actually sent and be sure it is a MTA problem or not

0

I have had this problem. It was taking 5 minutes to send a e-mail (timeout limit). I changed the name of the machine from "new-host" to his real dns name. Then it tooks only 90 seconds to send the e-mail. After that, I add to the /etc/resolv.conf (line "nameserver xx:xx:xx:xx:xx:xx", in place of xx... put the IPv6 IP from your DNS). Then the e-mail was sent in 3 seconds. A curious fact is: if I send a mail using sendmail from command line, the e-mail is sent quickly always. But from phpmail, the problem appear.

For more debug info (change timeout, etc), see the /opt/lampp/apps/wordpress/htdocs/wp-includes/class-phpmailer.php

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.