By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Apache/PHP sendmail configuration

P: n/a
Hi

I have a standalone machine running Mandrake 10 with apache server and
PHP installed.

The PHP mail() function is working but very slowly. It takes about
10-20 seconds to send a single email. Can anyone advise me on what
could be causing this? I have tried using mail() on other apache
setups and the response time has been much faster.

Below is the relevant section from my php.ini:

TIA

Andrew

php.ini
=======
[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.com

; For Unix only. You may supply arguments as well (default: "sendmail
-t -i").
;sendmail_path =
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Andrew Benjamin wrote:
Hi

I have a standalone machine running Mandrake 10 with apache server and
PHP installed.

The PHP mail() function is working but very slowly. It takes about
10-20 seconds to send a single email. Can anyone advise me on what
could be causing this? I have tried using mail() on other apache
setups and the response time has been much faster.


Andres,

It sounds like a DNS problem to me. It seems like sendmail is trying to
resolve your client computer's ip.
You could solve this by adding it to /etc/hosts on the server or hacking
the sendmail configuration.

Regards,
Ruben.
Jul 17 '05 #2

P: n/a
Hello,

On 07/12/2004 07:12 AM, Andrew Benjamin wrote:
I have a standalone machine running Mandrake 10 with apache server and
PHP installed.

The PHP mail() function is working but very slowly. It takes about
10-20 seconds to send a single email. Can anyone advise me on what
could be causing this? I have tried using mail() on other apache
setups and the response time has been much faster.


How slowly? Does it wait like 1 minute before delivering?

Or it waits some time but less than 1 minute?

If it waits one minute, that is likely a missing reverse DNS register
for your IP.

If it is not that much, it may be because sendmail by default attempts
to deliver messages immediately and depending on your destination it may
take a while to have your message accepted.

In this case the solution is to use the appropriate message delivery
mode, which is certainly not the immediate/interactive mode. Take a look
at this class that comes with a sub-class specialized in deliverying via
sendmail. It lets you configure the sendmail delivery mode before
sending. Take a look at the documentation of the class for mode details.

http://www.phpclasses.org/mimemessage
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #3

P: n/a
Manuel,

It waits about 1 minute. I think it is a DNS problem.

I've added the following line to my /etc/hosts:
"127.0.0.1 localhost.co.uk"
But this hasn't made a difference.

Is there a HOW-TO setup apache and sendmail for a standalone machine?

Thanks

Andrew

Manuel Lemos <ml****@acm.org> wrote in message news:<40**************@acm.org>...
Hello,

On 07/12/2004 07:12 AM, Andrew Benjamin wrote:
I have a standalone machine running Mandrake 10 with apache server and
PHP installed.

The PHP mail() function is working but very slowly. It takes about
10-20 seconds to send a single email. Can anyone advise me on what
could be causing this? I have tried using mail() on other apache
setups and the response time has been much faster.


How slowly? Does it wait like 1 minute before delivering?

Or it waits some time but less than 1 minute?

If it waits one minute, that is likely a missing reverse DNS register
for your IP.

If it is not that much, it may be because sendmail by default attempts
to deliver messages immediately and depending on your destination it may
take a while to have your message accepted.

In this case the solution is to use the appropriate message delivery
mode, which is certainly not the immediate/interactive mode. Take a look
at this class that comes with a sub-class specialized in deliverying via
sendmail. It lets you configure the sendmail delivery mode before
sending. Take a look at the documentation of the class for mode details.

http://www.phpclasses.org/mimemessage
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.