PHP, sendmail, and mail() - VERY SLOW - please help

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm working with a LAMP platform - PHP 5.1.4, MySQL 5.0.21, RedHat
Enterprise 4...  Running Sendmail 8.x.

I'm using the PHP mail() function to send some confirmation emails out
when a user submits a form.  My understanding is that this is basically
a wrapper for sendmail (specifically, sendmail -t -i).

In my development environment, this works great.  Everything is fast
and wonderful.

In my production environment, it takes 10-15 seconds or more before the
mail() function completes.  If I comment out that function, the page is
nice and quick again.

Does anyone have any ideas of what sort of configuration issue this
might be (I'm assuming this is a config issue).  My sendmail config
(/etc/sysconfig/sendmail) is pretty simple right now, it's just
specifying DAEMON=yes and QUEUE=1m.

Any advice would be much appreciated.  Thanks in advance.


Re: PHP, sendmail, and mail() - VERY SLOW - please help

Try to send an email from your system's command line or a standalone
application. If it's also slow it means that your SMTP server (or
enviroment) is just slow.

I use to send emails, it has tons of great features
[attachments, CC, BCC, etc] and excellent support (via forum). Try it!
I send emails via GMail and it takes 1-3 secs.


Site Timeline