I would like to know about attaching multiple attachment in single mail and send . Please refer my following oode. In this only one file is getting attached. That is second
For those who want to send multiple files using phpMailer and input file multiple. I joined and used the above two codes of @Rishi and @Matheno to achieve this result that dinamically add attachments selecteds by user.
On your input file name remember to put brackets:
On your php send file:
Instead of:
$mail->addAttachment('/var/tmp/file.tar.gz');
Use:
for($ct=0;$ctAddAttachment($_FILES['attach_file']['tmp_name'][$ct],$_FILES['attach_file']['name'][$ct]);
}