On Tue, Jan 26, 2010 at 12:02 PM, Angus Mann <angusm...@pobox.com> wrote:
> I'm currently using the phpmailer class from phpmailer.worxware.com 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?

The problem is that you are using Windows. Windows is a weak platform
for what you are doing as it lacks of free solutions like those you find
in Linux or any other Unix like OS.

Under Linux practically every MTA has a queue. All MTAs queue messages
by default instead of sending the message right away, except for sendmail.

That is way faster than having your application to send messages to your
MTA by SMTP as you are doing.

If you are really stuck with Windows, if you can use Microsoft Exchange,
you may use a faster solution. Exchange has a local pickup queue
directory. You just write messages in that directory and leave them
there. PHP does not need to wait for any delivery. Exchange will pickup
the messages ASAP and deliver them.

This is explained in this presentation. Jump to slide 11.


If you want to use this solution, the MIME message package has a driver
class for queueing messages in Exchange pickup queue directory . Take a
look at the test_pickup_message.php example script.



Manuel Lemos

Find and post PHP jobs

PHP Classes - Free ready to use OOP components written in PHP

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to