From: Paul M Foster
> On Tue, Jan 26, 2010 at 02:02:18PM +1000, Angus Mann wrote:
>> I'm currently using the phpmailer class from
>> to send datatbase -populated emails to clients.
>> At the moment I'm runninng PHP on Windows and using the built-in
>> sendmail equivalent packaged with XAMPP. It uses a remote SMTP that
>> authenticates by prior logging into a POP account.
>> The number of emails sent is very small. Each one is only sent after
>> a user fills out a form and presses send.
>> But there is a noticable lag of about 5 or sometimes 10 seconds
>> after pressing "send" before the user sees the "Mail sent" page.
>> I presume the reason for the lag is the time spent logging on and
>> off a remote POP, then SMTP server, transferring the data etc.
>> It would be better if this happened in the background - that is, the
>> user could get on with doing his next task while the emails sat in a
>> queue in the backgorund, being lined up and sent without PHP waiting
>> for the process to finish.
>> Can anybody recommend a good way of doing this? Is Mercury Mail going
>> to help me here?
> If this were me, I'd set up a mailserver on the web machine and send
> mail to it instead of using phpmailer to connect directly to a distant
> mailserver. The authentication between phpmailer and the local
> mailserver should be near instantaneous, and you can let the local
> mailserver deal with transferring mails in its own sweet time. I don't
> know if there's a mailserver included in XAMPP installations, but if
> I'd do that. In fact, if you're just sending simple emails, you could
> use PHP's built-in mail() function, which will connect directly to the
> local mailserver without further configuration.

As another option, I have a simple SMTP script (Perl) that listens on
port 25, accepts all forwarded messages and appends them to a text file.
Since it doesn't actually do anything, it is all but instantaneous. I
use it as a black hole relay MTA for development and test servers that
can't reach the real world. If anyone is interested, let me know and I
can send you a copy. It is adapted from something I found via Google.

Bob McConnell

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to