HEX
Server: Apache
System: Linux p3plzcpnl485017.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: rbrijwzv8p53 (8461783)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/rbrijwzv8p53/public_html/pak.mniops.education/internshipmail.php
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $applicant_email = $_POST["email"];
    $company_email = "pakistan@mniops.education, wisha.mniops@gmail.com";
    $subject = "Internship Application Submission";

    // Extract form data
    $fname = $_POST["fname"];
    $lname = $_POST["lname"];
    $email = $_POST["email"];
    $phone = $_POST["phno"];
    $options = $_POST["options"];
    $cv = $_POST["linkedin"];

    // Construct the email message for the company
    $company_message = "Dear Hiring Team,\n\n";
    $company_message .= "A new internship application has been submitted FROM MNIOPS PAKISTAN.\n\n";
    $company_message .= "Here are the applicant's details:\n\n";
    $company_message .= "First Name: $fname\n";
    $company_message .= "Last Name: $lname\n";
    $company_message .= "Email: $email\n";
    $company_message .= "Phone No: $phone\n";
    $company_message .= "Option Selected: $options\n";
    $company_message .= "Linkedin: $cv\n\n"; // Include the CV file name in the email
    $company_message .= "Please review the application and take appropriate action.\n\n";
    $company_message .= "Best regards,\n MNIOPS PAKISTAN";

    $company_headers = "From: MNIOPS <pakistan@mniops.education>\r\n";
    $company_headers .= "Content-type: text/plain; charset=utf-8";

    // Send the email to the company
    if (mail($company_email, $subject, $company_message, $company_headers)) {
        // Email to company sent successfully
    } else {
        // There was an error sending the email
        echo "Error sending email to company.";
    }

    // Send an automated response to the applicant
    $applicant_subject = "Thank You for Applying";
    $applicant_message = "Dear Candidate,\n\n";
    $applicant_message .= "Thank you for submitting your internship application to MNIOPS Pakistan. We have received your application, and our team will review it carefully.\n\n An enrolment councilor will contact you via email/phone and set up an interview. Watch for email & phone call on number/email provided in your registration form.";
    $applicant_message .= "We appreciate your interest in joining our team, and we will get back to you with further updates as soon as possible.\n\n";
    $applicant_message .= "Best regards,\n MNIOPS PAKISTAN";

    $applicant_headers = "From: MNIOPS <pakistan@mniops.education>\r\n";
    $applicant_headers .= "Content-type: text/plain; charset=utf-8";

    // Send the email to the applicant
    if (mail($applicant_email, $applicant_subject, $applicant_message, $applicant_headers)) {
        // Email to applicant sent successfully
    } else {
        // There was an error sending the email
        echo "Error sending email to applicant.";
    }
    header("Location: thank_you.html");
    exit();
}
?>