Hi bakers, I have a little problem and I cant fint a decent solution,
so I thought that here someone would delight me with some brilliant
solution...

I´m sending massive mails (Newsletter) to about 300 people. After the
first sent, some users complained that the mail was producing an
Outlook error of memory, and they cant open the email.  After that, I
tested the app sending the Newsletter to my email boxes, in a massive
way. After doing that, I´ve seen that the email size increases after
every sent. First I have mails of 18kb, and the last mails are about
50kb. I´m going to show my code now:

function sendEmails(){
                        set_time_limit(0);
                        $this->edition = $this->Mail->whatNewsIs();
                        $this->newsData = 
$this->Mail->Newsletter->getNewsData($this-
>edition);
                        $sends = $this->Mail->find('all', array('order' => 
'Mail.id ASC',
'limit' => $this->limit, 'restrict' => array('Mail')));
                        $this->Email->replyTo = 'Acep News <[EMAIL PROTECTED]>';
                $this->Email->from = "Acep News <[EMAIL PROTECTED]>";
                $this->Email->sendAs = 'html';
                        $this->Email->template = 'newsletter';
                        $this->Email->layout = 'newsletter';
                        $this->set('edition', $this->edition);
                        $this->set('narticles', $this->newsData);
                        if(!empty($sends)):
                        foreach ($sends as $send):
                                if ($send['Mail']['newsletter_id'] != 
$this->edition) {
                                        
$this->_changeNew($send['Mail']['newsletter_id']);
                                }
                                $this->Email->subject = 'Newsletter Edición ' . 
$this->edition;
                                $this->Email->to = $send['Mail']['email'];

                                if($this->Email->send())
                                        $this->Mail->del($send['Mail']['id']);


                        endforeach;


                        $this->Email->reset();
                        $this->Email->to = "[EMAIL PROTECTED]";
                        $this->Email->subject = "Tiempo tardado";
                        $this->Email->from = "AcepNews <[EMAIL PROTECTED]>";
                        $this->Email->template = null;
                        $this->Email->sendAs = 'text';
                        $content = date('d-m-Y H:i:s');
                        $this->Email->send($content, null, null);

                        endif;
                }


As you can see, I´m using template and layout, and no, I havent proved
yet to send the mail without the use of template and layout.

Well, anybody has been in some similar situation? Any kind of help is
apreciated.

Thanks!
mbavio
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to