Hello,

On 02/17/2003 07:04 AM, Brendon wrote:
I've been trying to fork sendmail because DNS checks cause it to be slow delivering messages...
Here's what i've tried, and many other variations...

$str = "to: [EMAIL PROTECTED]\nfrom: [EMAIL PROTECTED]\nsubject: test";
exec('sendmail -i -t $str >& /dev/null&');

Has anyone successfully acomplished something like this? ideas?

You are duplicating a function that sendmail already provides given the right switches. Anyway, if you want to raise the message delivery throughput, the best you can do is to use the deferred mode so it does not take a long time to queue the messages and then sendmail will take care of the delivery next time it runs the queue.

In that case you may want to look at this class for composing and sending messages that comes with sub-class to deliver with sendmail program directly. It comes with options to let you choose the appropriate sendmail delivery mode:

http://www.phpclasses.org/mimemessage


Thanks for that. I'll look at it and see if I can modify it for my needs.

The problem isn't sendmail priority. The system isn't doing anything and sendmail isn't doing anything. The problem is that it takes sendmail awhile for it to respond. No. sendmail isn't broke, it just has to do a lot of thinking before it talks to a client. I want to remove that problem from the equation by puting sendmail in the background once its called.
What I am telling you is that sendmail itself can act that way given that you pass the right command line switches when you invoke it.

The class above lets you tell sendmail to act that way but usually it is better to tell it to queue the message instead of trying to deliver it right away because if you attempt to deliver many messages at once you can exhaust your server resources easily and your script will break.

--

Regards,
Manuel Lemos


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



Reply via email to