I've searched the forums but I only find threads about sending ONE attachment, or other problems, but havent found anything about sending multiple attachments to multiple users.
Basically I loop through users database and send them an email. With one attachment it is no problem. But when I tried to use foreach or while to send MULTIPLE attachments (as in there are many PDF documents that will be sent as an attachment in the mail to all the users) it either does not send anything (when using foreach) or it only sends one attachment, usually the last uploaded (when using while).
I've tried many combinations like:
Code: Select all
while($row=mysql_fetch_array($attachmentquery, MYSQL_ASSOC)){
$mailer->AddAttachment("UserFiles/File"."/".$row['att_url']);
}And if yes, how can it be solved. If foreach is to be used, then how?
Thank you for your help.