I am trying to upload a doc file from a form and send it to email. I am using
$_FILES[\'file\'][\'tmp_name\'];
The problem is, it is retur
Just a suggestion, but you might try the Pear Mail_Mime class instead.
http://pear.php.net/package/Mail_Mime/docs
Otherwise you can use a bit of code. Gabi Purcaru method of using rename() won't work the way it's written. See this post http://us3.php.net/manual/en/function.rename.php#97347 . You'll need something like this:
$dir = dirname($_FILES["file"]["tmp_name"]);
$destination = $dir . DIRECTORY_SEPARATOR . $_FILES["file"]["name"];
rename($_FILES["file"]["tmp_name"], $destination);
$geekMail->attach($destination);