473,791 Members | 3,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Apache/PHP sendmail configuration

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.co m

; For Unix only. You may supply arguments as well (default: "sendmail
-t -i").
;sendmail_path =
Jul 17 '05 #1
3 4809
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
10246
by: Sumith Bandula | last post by:
Hi all, I am using a simple php script to send a mail. <?php if (mail($to, $sub, $message, $from)) echo "sent mail successfully<br>\n"; ?> It GOES $to = "me@localhost.localdomain"
0
2386
by: KevinGravelle | last post by:
Hello, I am running an Apache web server and my httpd configuration file is utilizing the aspdotnet_module in order to run an ASP.NET application. Whenever I try and open my existing web project, I get the error message: "Unable to get the project file from the Web server. Unable to open project 'WebApplication1'. The file path 'C:\Program Files\Apache Group\Apache2\htdocs\WebApplication1' does not correspond to the URL
5
5697
by: voronwae | last post by:
Hi folks. Either I'm missing something really obvious (most likely) or I'm missing something really subtle. I've been building up a machine as an IMP webmail server, with php 5.1.2, cyrus-sasl, openldap, imap, fileinfo, mod_perl, sqlite, horde, Berkeley DB and PostgreSQL, among others, on top of an old Potatoe machine that was already alive and in production so I just went with it. Everything worked great up until the installation of...
1
8589
by: IamtheEvster | last post by:
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.
6
7981
by: MaiyaHolliday | last post by:
Hello, I've recently installed apache on a new computer, and cannot figure out why my site will not process any includes. (it was working on my old one) There are no errors on the page such as "include not found", rather much of the page is blank where the included menus, etc would be, and the CSS is not attached. thanks so much!!! My httpd.conf looks like this:
0
2470
by: s2rinivasan | last post by:
I am srinivasan I sent a last message hoe to trouble shoot httpd passwd acces problum. In that I didn't menson that OS=RedHat LINUX EL4-2.6.9-5. This question also in the same version. In sendmail configuraton I did configure very carefully in /sendmail.mc and redirect it to /sendmail.cf by m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf and alternate the current version to /usr/sbin/sendmail.sendmail but when restart the
11
3371
by: =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?= | last post by:
With Apache's mod_rewrite module I can keep *.php files and load them as *.html files: # Make http//example.com/foo/bar.html load /home/site/foo/bar.php RewriteEngine On RewriteRule ^(.*)\.html$ $1.php But, is there any elegant way to prevent direct access to "http//example.com/foo/bar.php"? No matter the "L" flag, all *.html requests get parsed again with any *.php rule I write, even though the
13
1964
by: RJ_32 | last post by:
looking here: http://www.devarticles.com/c/a/PHP/Getting-Intimate-With-PHPs-Mail-Function/2/ it says that I have to be careful about what I send to the sendmail process via popen(). Does that also apply to the Subject: line? (I'm opening a process rather than simply using mail() so that I can set the return-path header with sendmail's -f switch and catch bounces.) My From: and To: are hardcoded and *not* taken from any webform...
6
7601
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not work. Please review my work and let me know if you see that one little thing that is throwing me for a loop. HTTPD.CONF # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10156
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.