Hunter Bajwa
Server: Microsoft-IIS/7.5
System: Windows NT EGAL 6.1 build 7601
User: IUSR_hrreflections (0)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: C:/inetpub/vhosts/hrreflections.com/httpdocs/mail-BK/resume-upload.php
<?php
    ini_set('sendmail_from', 'careers@hrreflections.com'); 
ini_set('SMTP','206.183.111.202');
ini_set('smtp_port',25); 
	if($send_using_gmail){
 $mail->IsSMTP(); // telling the class to use SMTP
 $mail->SMTPAuth = true; // enable SMTP authentication
 $mail->SMTPDebug  = 2;
 $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
 $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
 $mail->Port = 465; // set the SMTP port for the GMAIL server
 $mail->Username = "careers@hrreflections.com"; // GMAIL username
 $mail->Password = "venusapril"; // GMAIL password
}
	
	if(isset($_POST['submit']))
	{
 
        //The form has been submitted, prep a nice thank you message
  //      $output = '<h1>Thanks for your file and message!</h1>';
        $thankyouurl = "http://www.hrreflections.com/thank-you.html" ;
        //Set the form flag to no display (cheap way!)
		$flags = 'style="display:none;"';

        //Deal with the email
        $to = 'careers@hrreflections.com';
        $to = 'careers@hrreflections.com';   
     $fromEmail = $_REQUEST['email']; 
        $subject = 'Reply from hrreflections.com';
	    $subject1 = 'Job Seeker Enquiry Form';


//      $message = strip_tags($_POST['message']);
//		$email = strip_tags($_POST['email']);
		$name = $_POST['name'] ;
		$cname = $_POST['cname'] ;
		$email = $_POST['email'] ;
		$phone = $_POST['con'] ;
		$curj = $_POST['curj'] ;
		$industry = $_POST['industry'] ;
		$currentctc = $_POST['currentctc'] ;
		$experience = $_POST['experience'] ;
		$currentJlocation = $_POST['currentjoblocation'] ;
		$type = $_FILES['file']['type'] ;
        $attachment = chunk_split(base64_encode(file_get_contents($_FILES['file']['tmp_name']))) ;
        $filename = $_FILES['file']['name'] ;
        $boundary =md5(date('r', time())) ; 
        $headers = "From: careers@hrreflections.com\r\nReply-To: careers@hrreflections.com";
	    $headers .= "\r\nMIME-Version: 1.0\r\nContent-Type: multipart/mixed; boundary=\"_1_$boundary\"";

      
		/*********** Email body *******************/

//$messageproper =
$message =

	//"This message was sent from:\n" .
	//"$http_referrer\n" .
	"------------------------------------------------------------\n" .
	"Name: $name\n" .
	"Current Company: $cname\n" .
	"Email: $email\n" .
	"Contact No: $phone\n" .
    "Current Job Designation: $curj\n" .
	"Industry Type: $industry\n" .
	"Current CTC (in lacs) Yearly: $currentctc\n" .
	"Experience: $experience\n". 
    "Current job Location: $currentJlocation\n".
	
	"\n\n------------------------------------------------------------\n" .
	"Regards\n" . 
	"HR Reflections\n" ;


/*********** Email body End *******************/
	
$message="This is a multi-part message in MIME format.



--_1_$boundary
Content-Type: multipart/alternative; boundary=\"_2_$boundary\"

--_2_$boundary
Content-Type: text/plain; charset=\"iso-8859-1\"
Content-Transfer-Encoding: 7bit

$message

--_2_$boundary--
--_1_$boundary
Content-Type: application/octet-stream; name=\"$filename\" 
Content-Transfer-Encoding: base64 
Content-Disposition: attachment 

$attachment
--_1_$boundary--";

	


  mail($to, $subject1, $message, $headers, "From: hrreflections.com <careers@hrreflections.com>");

  mail($fromEmail, $subject, $message, $headers);
 header( "Location: $thankyouurl" );

  }
?>