Re: mass mailing wih mail

From: Date: Wed, 20 Apr 2005 13:18:16 +0000
Subject: Re: mass mailing wih mail
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18828@lists.php.net to get a copy of this message
this is for inserting them into the queue $mail_queue = new Mail_QueueCustom($this->settings['mail_queue']['db_options'],$this-
settings['mail_queue']['mail_options']);
$mail_queue->sendAsHTML(true); $mail_queue->setSender($this-
settings['project']['admin_name'],$this-settings['project']['admin_email']); $mail_queue->setRcpt($this-settings['project']['admin_name'],$this-settings['project']['admin_email']); $mail_queue->setCc($this->settings['project']['cc_name'],$this-settings['project']['cc_email']);
this part i need to tweak more, i store the subject also into an email template with the body and it parses the bits, its a little freaked but works. $this->tpl->compile('mail_newentry.html'); $mailtext = $this->tpl->bufferedOutputObject($this); require_once 'Mail/mimeDecode.php'; $decoder = new Mail_mimeDecode($mailtext); $this->email_template = $decoder->getSendArray(); $mail_queue->setSubject($this->email_template[1]['Subject']); $this->tpl->compile('mail_main.html'); $message = $this->tpl->bufferedOutputObject($this); $mail_queue->put($message,1,false); to send $mail_queue = new Mail_QueueCustom($this->settings['mail_queue']['db_options'],$this-
settings['mail_queue']['mail_options']); $mail_queue->sendMailsInQueue(50);
On 20/04/2005, at 11:04 PM, Alexander Petri wrote:
is it possible that you post me some example code of your special mail queue code? "Dan Rossi" <pear@electroteque.org> schrieb im Newsbeitrag news:35fd7792ecfea50a84447eb4d5111dd3@electroteque.org...
On 20/04/2005, at 10:30 PM, Alexander Petri wrote:
Is it possible to mail lots of mails (>2000) with PEAR::Mail to users. It is not a personalized mail so i want to put all the emailadresses in an array an send them in one mail. has someone experiences with this? --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
In my experience PHP layer via an apache module is not really stable for that many emails , i would use a mailman announcement list for that many emails what you reckon ? Or you could check out Mail_Queue instead. Sadly u have to build the headers yourself ! I however have built a custom subclass which builds headers into an array for u ! So from, to, cc, bcc etc .. Maybe i should commit these changes somewhere ?
--PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.general (#18828) next »