How do you attach the same multiple images to multiple emails?

I have a ‘Send Mail’ API which works very well. It sends an HTML email to multiple recipients with an attached PDF report.

My problem is attaching several images (anything from 3 to 20 images) to accompany the PDF report. The images are wanted as individual attachments. I have tried several things including the following…

I cannot figure out how to do this. Within my API I have two database queries, one for the system user details, and the other lists the images as paths…


But I get this error when trying to send the email…

Can someone guide me in the right direction?

** EDIT **
Everything works as it should! The file structure had been changed and the test data hadn’t been updated so all is good.
Very happy with this now.