I am using PHPMailer to send a form and I would like the attached files when they arrived in the destination email, had the file name the email of the person I sent, not the file name, I did several tests here but I could not.
<input type="file" name="arquivo[]" multiple>
$email = strip_tags(trim($_POST['email']));
$arquivo = $_FILES['arquivo'];
if ($arquivo['size'][0] != 0) {
for ($i = 0; $i < count($arquivo ['tmp_name']); $i++) {
$mail->AddAttachment($arquivo ['tmp_name'][$i], $arquivo['name'][$i]);
}
}