Answer the question
In order to leave comments, you need to log in
PHPMailer + Ajax - submitting a form with attachments?
Hello!
I use this code:
for ($i=0; $i < count($_FILES['attachment']['tmp_name']); $i++) {
$mail->addAttachment($_FILES['attachment']['tmp_name'][$i], $_FILES['attachment']['name'][$i]);
}
<input type="file" class="field-file" name="attachment[]" multiple>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question