Register Here
if($nameErr==""&& $emailErr=="" && $mobileErr=="" && $locationErr==""){
//$to = "webrozone@gmail.com";
$imagefiletype = pathinfo($_FILES['my_file']['name'], PATHINFO_EXTENSION);
$imagefilesize = $_FILES['my_file']['size'];
$imagefiletype1 = pathinfo($_FILES['my_file1']['name'], PATHINFO_EXTENSION);
$imagefilesize1 = $_FILES['my_file1']['size'];
// echo $imagefiletype;
// echo $imagefiletype1;
// echo $imagefilesize;
// echo $imagefilesize1;
if($imagefilesize<5000000 && ($imagefiletype=='jpg' || $imagefiletype=="jpeg") && $imagefilesize1<5000000 && ($imagefiletype1=='jpg' || $imagefiletype1=="jpeg")){
$subject="Enquiry for Model Hunt";
$todayis = date("l, F j, Y, g:i a") ;
//$subject="Thank You For Registration - Teamtalentfactory";
$name = $_POST['sender_name'];
$email = $_POST['sender_email'];
//Capture POST data from HTML form and Sanitize them,
$sender_name = $_POST["sender_name"]; //sender name
$reply_to_email = $_POST["sender_email"]; //sender email used in "reply-to" header
$sender_birth = $_POST["sender_birth"]; //get subject from HTML form
$sender_place = $_POST["sender_place"]; //get subject from HTML form
$sender_phone = $_POST["sender_mobile"]; //get subject from HTML form
$subject2="Teamtalentfactory - Thank You For Showing Your Interest";
$message="
Application For Registration
Full Name : $sender_name
Date Of Birth (Month-Day-Year) : $sender_birth
Location : $sender_place
Phone No. : $sender_phone
";
$mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x";
$headers = "From: $email\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: multipart/mixed;\r\n" .
" boundary=\"{$mime_boundary}\"";
$headers2 = "From: Team Talent Factory\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: multipart/mixed;\r\n" .
" boundary=\"{$mime_boundary}\"";
$message = "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$message . "\n\n";
//echo $_FILES['my_file']['size']."
";
//echo $_FILES['my_file']['type']."
";
foreach($_FILES as $userfile)
{
$tmp_name = $userfile['tmp_name'];
$type = $userfile['type'];
$name = $userfile['name'];
$size = $userfile['size'];
if (file_exists($tmp_name))
{
if(is_uploaded_file($tmp_name))
{
$file = fopen($tmp_name,'rb');
$data = fread($file,filesize($tmp_name));
fclose($file);
$data = chunk_split(base64_encode($data));
}
$message .= "--{$mime_boundary}\n" .
"Content-Type: {$type};\n" .
" name=\"{$name}\"\n" .
"Content-Disposition: attachment;\n" .
" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n";
}
}
$message.="--{$mime_boundary}--\n";
/*
if (mail($to, $subject, $message, $headers)){
echo "
Thank You For Showing Your Interest, the concerned department will get in touch with you Shortly...
";
}else{echo "Error in mail";}
*/
$from_email = $_POST['sender_email']; //from mail, it is mandatory with some hosts
$recipient_email = 'deepika@teamtalentfactory.com'; //recipient email (most cases it is your personal email)
$recipient_email1 = 'queries@teamtalentfactory.com'; //recipient email (most cases it is your personal email)
$recipient_email2 = 'kamal@webcrawlers.in'; //recipient email (most cases it is your personal email)
//$recipient_email = 'shukla.naveen191@gmail.com'; //recipient email (most cases it is your personal email)
//$recipient_email1 = 'kamal@webcrawlers.in'; //recipient email (most cases it is your personal email)
//$recipient_email1 = 'webrozone@gmail.com'; //recipient email (most cases it is your personal email)
$sentMail = @mail($recipient_email, $subject, $message, $headers);
$sentMail1 = @mail($recipient_email1, $subject, $message, $headers);
$sentMail3 = @mail($recipient_email2, $subject, $message, $headers);
//$sentMail2 = @mail($recipient_email2, $subject, $body, $headers);
$sentMail2 = @mail($from_email, $subject2, "This is to inform you that we have received your details and regarding this the concerned department will get back to you soon.", $recipient_email1);
if($sentMail && $sentMail1 && $sentMail3) //output success or failure messages
{
if($sentMail2) //output success or failure messages
{
echo '
Thank You For Showing Your Interest, the concerned department will get in touch with you Shortly...
';
//$sentMail1 = @mail($recipient_email1, $subject, $body, $headers);
//if($sentMail1){
//die('Thank you for your email');
//}
}else{
echo '
Could not send mail to third party! Please check your details
';
}
}else{
echo '
Could not send mail! Please check your details
';
}
}else{echo '
Image Type should be JPG/JPEG or size does not exceed 5Mb
'; }
}
?>