I\'m using this to attach files to an mail after uploading them to my server:
for ($i = 0; $i <= 2; $i++)
{
$mail->AddAttachment($locatie.$_FILES[\
You need to check if that file was actually uploaded/exists before adding the attachment. Something like
for ($i = 0; $i <= 2; $i++)
{
if (file_exists($locatie.$_FILES['uploaded'.$i]['tmp_name'])) {
$mail->AddAttachment($locatie.$_FILES['uploaded'.$i]['tmp_name'], $_FILES['uploaded'.$i]['name']);
}
}