![]() |
Multiple Email Not Sending Correct - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Multiple Email Not Sending Correct (/showthread.php?tid=62524) |
Multiple Email Not Sending Correct - wolfgang1983 - 07-24-2015 I am trying to send multiple email but having small issue. I can get my news letter emails from the database but I can not get the email to send correct. For some reason it only sends the message to the first email in the list and not the others. How can I make sure it sends to all emails in list. PHP Code: public function sendmail() { Email Model PHP Code: public function get_emails() { RE: Multiple Email Not Sending Correct - mwhitney - 07-24-2015 After you send the first email, you're either going to show_error() or redirect(), so the loop breaks. Instead, you should just track the results and store the debug messages for any failures, then show the errors or success message after the loop. For example: PHP Code: public function sendmail() { RE: Multiple Email Not Sending Correct - wolfgang1983 - 07-24-2015 (07-24-2015, 07:06 AM)mwhitney Wrote: After you send the first email, you're either going to show_error() or redirect(), so the loop breaks. Instead, you should just track the results and store the debug messages for any failures, then show the errors or success message after the loop. For example: Thank you now under understand |