Name : ".$sender_name; $message.= "
"; $message.= "
"; $message.= "Contact Number : ".$contact_number; $message.= "
"; $message.= "
"; $message.= "Sender Email : ".$sender_email; $message.= "
"; $message.= "
"; $message.= "Address : ".$address; $message.= "
"; $message.= "
"; $message.= filter_var($_POST["message"], FILTER_SANITIZE_STRING); /* //don't forget to validate empty fields if(strlen($sender_name)<1){ die('Name is too short or empty!'); } */ //Get uploaded file data $file_tmp_name = $_FILES['my_file']['tmp_name']; $file_name = $_FILES['my_file']['name']; $file_size = $_FILES['my_file']['size']; $file_type = $_FILES['my_file']['type']; $file_error = $_FILES['my_file']['error']; /*if($file_error > 0) { die('Upload error or No files uploaded'); }*/ //read from the uploaded file & base64_encode content for the mail $handle = fopen($file_tmp_name, "r"); $content = fread($handle, $file_size); fclose($handle); $encoded_content = chunk_split(base64_encode($content)); $boundary = md5("sanwebe"); //header $headers = "MIME-Version: 1.0\r\n"; $headers .= "From:".$from_email."\r\n"; $headers .= "Reply-To: ".$reply_to_email."" . "\r\n"; $headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n"; //plain text $body = "--$boundary\r\n"; $body .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $body .= "Content-Transfer-Encoding: base64\r\n\r\n"; $body .= chunk_split(base64_encode($message)); //attachment $body .= "--$boundary\r\n"; $body .="Content-Type: $file_type; name=".$file_name."\r\n"; $body .="Content-Disposition: attachment; filename=".$file_name."\r\n"; $body .="Content-Transfer-Encoding: base64\r\n"; $body .="X-Attachment-Id: ".rand(1000,99999)."\r\n\r\n"; $body .= $encoded_content; $sentMail = @mail($recipient_email, $subject, $body, $headers); if($sentMail) //output success or failure messages { //die('Thank you for your email'); echo ""; header('location:contact.php'); }else{ die('Could not send mail! Please check your PHP mail configuration.'); } } ?> LED Lighting Leading Company
Home | Sitemap             
Logo  

Contact Us




















Contact Us :
Saffire Solutions
B - 03, Main Road Bishanpura
Sec - 58, Noida, U.P
Landline No. - 01204371125
Mobile No. - 9899405433
    © 2013 Saffire Solutions                                                                                                                                                                                     Site Designed & Hosted by Net-Ions