Manuel Lemos wrote:

> Hello,
> 
> On 03/04/2004 10:38 PM, Marc wrote:
>> I need every week to check mails in a database and send them on e-mail to
>> a mailinglist server to synchronise the datas.
>> 
>> I work with two mailing servers and 4 mailinglists (2 on each server).
> 
>  > so I need to send 4 lists in mail :
>  > one to server 1 with liste A
>  > one to server 1 with liste B
>  > one to server 2 with liste C
>  > one to server 3 with liste D
> 
> Why do you need to use more than one server? Seems to me like a waste of
> resources. The greatest bottleneck of mailing delivery is bandwidth. If
> you have bandwidth, you can use a mail server like qmail that can be
> configure to execute many simultaneous deliveries .
This is not my own ! My client has a contract withe two partners for two
mailing lists each one. But the datas come from the same database.

> 
>> I would like to know what is the best way for optimazing the server
>> resources :
>> 
>> To send mail during browsing of the record set of the database every time
>> I change liste
>> or
>> browsing all the recordset pushing the datas in a array every time I
>> change mailinglist and when browsing is closed send browse the array and
>> send the four mail with the mail() function ?
> 
> If you are queuing messages to many users, it does not make much sense
> to do it from a Web process as it does not require any Web output. You
> can do it running PHP from shell of a cron like scheduled task.
I think you did'nt understand what I said (my english is so poor !). The php
script is a cron task and only send a mail for each mailinglist wich
contains only : 
SUBSCRIBE [EMAIL PROTECTED] [EMAIL PROTECTED] 
SUBSCRIBE [EMAIL PROTECTED] [EMAIL PROTECTED]
...

I only wandted to know if it was better to interrupt the loop and send mail
or let the loop run and after use the mail function and send the four mail
with the four list of clients.

> 
>> Is there a solution which permits sending all my mails (4) in one smtp
>> connextion ?
> 
> There is a misconception here. You do not need to relay messages on a
> SMTP server to send them . Sending messages just requires connecting to
> the recipients SMTP server. Just use a local mailer program like
> sendmail or the equivalent based on qmail and postfix and they take care
> of deliveries from then on.
> 
We use qmail but we have only a DSL connection. Our databas is on a web
hosting in France and our partners are sending mailing list from the
caribbean area. It can't be optimised the same than if all stuff where on
our own server.

Thanks for your help.

Regards

Marc

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

Reply via email to