MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.146.152.119
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/alkareemtravel.com/.well-known/../public_html/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/alkareemtravel.com/.well-known/../public_html/../enquiry_form_mail.php
<?php
//get data from form  

// $name = $_POST['enquiry_name'];
// $email= $_POST['enquiry_email'];
// $message= $_POST['enquiry_detail'];
// $mobile= $_POST['enquiry_mobile'];
// $img=$_POST['img'];
// $to = "info@alkareemtravel.com"; //admin official mail
// $subject = "Mail From CV Form";
// $txt ="Name = ". $name . "\r\n  Email = " . $email . "\r\n Message =" . $message. "\r\n Mobile Number =" . $mobile;
// $headers = "From: noreply@Alkareentravel.com" . "\r\n" .
// "CC: somebodyelse@example.com";
// if($email!=NULL){
//     mail($to,$subject,$txt,$headers);
// }
//redirect
// echo ("<script LANGUAGE='JavaScript'>
//     window.alert('Succesfully sent');
//     window.location.href='employers.php';
//     </script>");
?>



<?php

    $filenameee =  $_FILES['file']['name'];
    $fileName = $_FILES['file']['tmp_name']; 
    $enquiry_name = $_POST['enquiry_name'];
    $enquiry_mobile = $_POST['enquiry_mobile'];
    $enquiry_email = $_POST['enquiry_email'];
    $usermessage = $_POST['enquiry_detail'];

    $message ="Name = ". $enquiry_name . "\r\n  Email = " . $enquiry_email . "\r\n Message =" . $usermessage . "\r\n Phone No. =" . $enquiry_mobile; 
    
    $subject ="Mail From CV Form";
    $fromname ="alkareemtravel.com";
    $fromemail = 'noreply@alkareem.com';  //if u dont have an email create one on your cpanel

    $mailto = 'at7838324498@gmail.com';  //the email which u want to recv this email




    $content = file_get_contents($fileName);
    $content = chunk_split(base64_encode($content));

    // a random hash will be necessary to send mixed content
    $separator = md5(time());

    // carriage return type (RFC)
    $eol = "\r\n";

    // main header (multipart mandatory)
    $headers = "From: ".$fromname." <".$fromemail.">" . $eol;
    $headers .= "MIME-Version: 1.0" . $eol;
    $headers .= "Content-Type: multipart/mixed; boundary=\"" . $separator . "\"" . $eol;
    $headers .= "Content-Transfer-Encoding: 7bit" . $eol;
    $headers .= "This is a MIME encoded message." . $eol;

    // message
    $body = "--" . $separator . $eol;
    $body .= "Content-Type: text/plain; charset=\"iso-8859-1\"" . $eol;
    $body .= "Content-Transfer-Encoding: 8bit" . $eol;
    $body .= $message . $eol;

    // attachment
    $body .= "--" . $separator . $eol;
    $body .= "Content-Type: application/octet-stream; name=\"" . $filenameee . "\"" . $eol;
    $body .= "Content-Transfer-Encoding: base64" . $eol;
    $body .= "Content-Disposition: attachment" . $eol;
    $body .= $content . $eol;
    $body .= "--" . $separator . "--";

    //SEND Mail
    if (mail($mailto, $subject, $body, $headers)) {
        echo ("<script LANGUAGE='JavaScript'>
    window.alert('Succesfully sent');
    window.location.href='enquiry-form.php';
    </script>");
        
        
    } else {
        echo "mail send ... ERROR!";
        print_r( error_get_last() );
    }

MMCT - 2023