![]() |
Duplicate Attachments with Email Class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Duplicate Attachments with Email Class (/showthread.php?tid=19683) |
Duplicate Attachments with Email Class - El Forum - 06-15-2009 [eluser]spider pig[/eluser] I'm sending emails from a queue with an attachment. The email is sent ok, but the first email has one attachment, the second email has 2 copies of the same attachment, the third email has 3 copies of the same attachment etc. Eventually, there is a PHP error because it can't allocate enough memory. Is there a way to reset the email class between each loop so it only sends one attachment per email. Since the email queue can have different emails with different email attachments or even no attachments, I can't set the attachment once before the loop. Here is the code: Code: function index() { Thanks Duplicate Attachments with Email Class - El Forum - 06-15-2009 [eluser]Thorpe Obazee[/eluser] Code: $this->email->clear() Duplicate Attachments with Email Class - El Forum - 06-15-2009 [eluser]spider pig[/eluser] [quote author="bargainph" date="1245137738"] Code: $this->email->clear() I tried it but it still didn't work, then I had a look at the manual and this works: Code: $this->email->clear(TRUE); Thanks BRAAIIINNNSSS!!! for pointing me in the right direction. Duplicate Attachments with Email Class - El Forum - 11-23-2009 [eluser]Unknown[/eluser] Same here. Didn't notice that during the first glance. |