CodeIgniter Forums
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: Email class (/showthread.php?tid=22301)



Email class - El Forum - 09-04-2009

[eluser]The Mask[/eluser]
Hi,

I have an array of recipients to send an email to but would like a separate email sending to each recipient so the people can't see the other peoples email addresses. I currently have a loop, similar to this...

foreach ( $emails as $email )
{
$this->email->to( $email->email_address );
$this->email->send();
}

1) The email body seems to get a bit screwed up with characters missing for some reason.
2) Is there a better way to do this? bcc_batch perhaps but not much documentation on this.

Any help appreciated.
Cheers


Email class - El Forum - 09-04-2009

[eluser]designfellow[/eluser]
Hi,

Use $this->email->clear() line after send() function. It will clear the existing things.

You can also add multiple emails by separating with comma in cc() and bcc()
example: $this->email->cc('abc@xyz.com','xyz@abc.com');




Happy Coding,
DesignFellow