PHP Mailer for sending mail as Magento uses the PHP mail() method by default, although there are extensions that can be installed to override this behaviour.
To send email from Magento you need to configure an email SMTP server on the web host/server.
You need to configure PHP-Mailer via PHP ini configuration file with the mail function, to provide correct sendmail, or an correct hostname, etc.
For file attachment
The above method creates a file in the uploads/ directory with the name of the file as it was named on the up-loader laptop.
After then use this sample code to add the attachment to phpMailer so you are basically attempting to attach a file.
<input id="file" name="file" type="file" />
$email = $_REQUEST['email'] ;
require("phpmailer/PHPMailerAutoload.php");//adding a file
$mail = new PHPMailer();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "email@example.com"; // SMTP username
$mail->Password = "hidden"; // SMTP password
$mail->From = $email;
$mail->SMTPSecure = 'tls';
$mail->Port = 587; //SMTP port
$mail->addAddress("firstname.lastname@example.org", "your name");
$mail->Subject = "You have an email from a website visitor!";
echo "Message could not be sent. <p>";
echo "Mailer Error: ";
echo "<script>alert('Message has been sent')</script>";