Re: optimisation sending mails
| From: | Manuel Lemos | Date: | Fri, 05 Mar 2004 02:47:33 +0000 |
| Subject: | Re: optimisation sending mails | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179518@lists.php.net to get a copy of this message | ||
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 DWhy 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 .
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.
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. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html