php - Trying to use PHPMailer to send mass-emails

one text

Solution:

Take a look at the mailing list example provided with PHPMailer - you could probably improve the efficiency of what you're doing so far. I'd also recommend making your script less monolithic - break it up into small pieces that link together and you should find it easier to work with.

I think your immediate problem is simply this:

return $email->Send();

That will send the first email, then quit! Just delete the return (and maybe add some error handling as per the example) and the loop will be able to continue.

Source