Since you are using yii. SO lets do it in yii style.
First of create an object for the uploaded file
$attachment=CUploadedFile::getInstance($model, 'filename');
if($attachment !== null){
$path= $attachment->tempName;
$name=$attachment->name;
}
// then do the coding for you mail and change this line
$mail->AddAttachment($path,$name);