hai provato anzi che:
Codice PHP:
unlink($_FILES['uploadfile']['name']); 
cosi?

Codice PHP:
unlink($messaggio->AddAttachment('upload/'.$alleg));