There is a code phpmailer-a which attaches only one file to the letter:
$mailer = "test2015@gmail.com"; $mail = new PHPMailer(); $mail->From = 'test@test.ru'; // ΠΎΡ ΠΊΠΎΠ³ΠΎ //ΠΠΎΡΡΠ° ΠΊΠ»ΠΈΠ΅Π½ΡΠ° $mail->FromName = "ΠΠ°ΡΡΠΈΠ½Ρ LP"; // ΠΎΡ ΠΊΠΎΠ³ΠΎ $mail->IsHTML(true); // Π²ΡΡΡΠ°Π²Π»ΡΠ΅ΠΌ ΡΠΎΡΠΌΠ°Ρ ΠΏΠΈΡΡΠΌΠ° HTML $mail->Subject = $subject; // ΡΠ΅ΠΌΠ° ΠΏΠΈΡΡΠΌΠ°; if ($_FILES['file2']) { $mail->AddAttachment($_FILES['file2']['tmp_name'], $_FILES['file2']['name']); } $mail->Body = '$message'; $mail->AddAddress($mailer); // ΠΊΠΎΠΌΡ - Π°Π΄ΡΠ΅Ρ, ΠΠΌΡ $mail->Send();
the form is multiboot (the ability to select multiple files at once). How to change this php code to attach all the files coming from the form?