<?php
		
		$name = $_POST['name'];
		$mobile = $_POST['contact'];
		$email = $_POST['email'];
		$subject = 'Enquiry';
		$msg = $_POST['message'];
		
		$content = "Enquiry Mail<br>Person Name : ".$name."<br>Mobile No : ".$mobile."<br>Email : ".$email."<br>Subject : ".$subject."<br>Message : ".$msg."<br>";
					
		require 'mail/PHPMailerAutoload.php';
		$mail = new PHPMailer(); // defaults to using php "mail()"
		$body = $content;
		//$body = eregi_replace("[\]",'',$body);
		$mail->isSendmail();
		$mail->AddReplyTo("dev@yashfoto.com","Enquiry Mail");
		$mail->SetFrom('dev@yashfoto.com', 'Enquiry Mail');
		$address = "info@yashfoto.com";
		$mail->AddAddress($address, "Yash Photography");
		$mail->Subject    = "Enquiry Mail";
		$mail->AltBody    = "Enquiry Mail"; // optional, comment out and test
		$mail->MsgHTML($body);
		//$mail->AddAttachment("images/phpmailer.gif");      // attachment
		//$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
		if(!$mail->Send()) {
		//echo "Mailer Error: " . $mail->ErrorInfo;
		echo "<script>alert('Mail Not Send');window.location='contact.php';</script>";
		} else {
		//echo "Message sent!";
		echo "<script>alert('Success');window.location='contact.php';</script>";
		}
	

?>