send different messages to different email accounts using SMTP PHPMailer

I want to send different messages to different email accounts fetched from my Database,
The email can be up to 100 emails fetched from Database and messages must be different for each email account,
I tried this Code But unfortunately it sends one message to the first user only.
What I made wrong in this code please help me, Thank you.

Execute script in background

I have a slight issue with my code which I have been trying to handle. I am trying to send mail using php at different times in my project and most of them are user triggered. Since there are different mailing points and pages, I created a single mailing script where I send all the mailing requests to (that way, all emails are sent from a single page).

sending mail to multiple email address in codeigniter php not working

i am trying to send mails to emails selected using checkbox in codeigniter website using phpmailer, <input class="acb" type="checkbox" name="email[]" value="<?= $val->email?>" /> PHP $this->load->library('phpmailer_lib'); $mail = $this->phpmailer_lib->load(); $mail->isSMTP(); $mail->Host = ''; $mail->SMTPAuth = true; $mail->Username = ''; $mail->Password = ''; $mail->SMTPSecure = 'ssl'; $mail->Port = 465; $mail->setFrom('<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0c6d686165624c">[email protected]</a>', 'Test'); $mail->addReplyTo('<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" … Read more