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.

Sending email with gmail smtp with codeigniter email library

If you prefer not to set preferences using the above method, you can
instead put them into a config file. Simply create a new file called
the email.php, add the $config array in that file. Then save the file
at config/email.php and it will be used automatically. You will NOT
need to use the $this->email->initialize() function if you save your
preferences in a config file.