Re: Re: dropping mail into queue
| From: | Petre Agenbag | Date: | Mon, 30 Sep 2002 09:02:17 +0000 |
| Subject: | Re: Re: dropping mail into queue | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118171@lists.php.net to get a copy of this message | ||
Thanks alot!.
I will go and give this a try.
Thanks alot for replying, I almost gave up on this!
On Mon, 2002-09-30 at 05:56, Manuel Lemos wrote:
> Hello,
>
> On 09/08/2002 11:51 AM, Petre Agenbag wrote:
> > Hi list
> > Is is possible to change the default behaviour of the mail() function to
> > send the message to the queue instead of trying to send it immediately?
> > I did do some research into this a while back, but it never really got
> > to a point where I was completely satisfied with the results. I can
> > recall from then that the behaviour of the mail() function was inherited
> > from the way sendmail was configured on the server, but I cannot go that
> > route ( ie, reconfigure sendmail to send all mail requests to the queue,
> > as the server is not only a webserver, but servers my clients normal
> > e-mail as well), so I'm basically asking if it is possible to "override"
> > the sendmail behaviour when you issue the mail() function, or to even
> > compose and write the message directly to the /var/spool/mqueue folder (
> > that would obviously NOT use the mail() function).
> > The reason for all this is that there are some clients that are
> > abusing/miss-using the mail() function to query a mysql db of 20K users
> > with a while() loop and then doing a mail() inside the while, this is
> > causing some serious problems on my server, and I'm trying to look for
> > ways to put a tab on this.So any other suggestions are also very
> > welcome.
>
> You need to set the DeliveryMode option to queue. Take a look at this
> class and in particular to the sendmail_mail.php scripth that is a
> wrapper arround the class to emulate the mail() function but in a way
> that lets you configure sendmail delivery mode directly from your
> scripts. Set the delivery_mode variable of the $message_object to
> SENDMAIL_DELIVERY_QUEUE .
>
> http://www.phpclasses.org/mimemessage
>
>
> --
>
> Regards,
> Manuel Lemos
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>