File: /home/rbrijwzv8p53/public_html/uae.mniops.education/internshipmail.php
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$applicant_email = $_POST["email"];
$company_email = " uae@mniops.education";
$subject = "Internship Application Submission";
// Extract form data
$name = $_POST["name"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$province = $_POST["province"];
$postal_code = $_POST["postal_code"];
$website = $_POST["website"];
$cover_letter = $_POST["cover_letter"];
$reason_to_join = $_POST["reason_to_join"];
// Construct the email message for the company
$company_message = "Dear Hiring Team,\n\n";
$company_message .= "A new internship application has been submitted.\n\n";
$company_message .= "Here are the applicant's details:\n\n";
$company_message .= "Name: $name\n";
$company_message .= "Email: $email\n";
$company_message .= "Phone: $phone\n";
$company_message .= "Province: $province\n";
$company_message .= "Postal Code: $postal_code\n";
$company_message .= "Portfolio Website: $website\n\n";
$company_message .= "Cover Letter:\n$cover_letter\n\n";
$company_message .= "Reason to Join:\n$reason_to_join\n\n";
$company_message .= "Please review the application and take appropriate action.\n\n";
$company_message .= "Best regards,\n MNIOPS";
$company_headers = "From: MNIOPS <uae@mniops.education>";
// Send the email to the company
mail($company_email, $subject, $company_message, $company_headers);
// 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";
$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";
$applicant_headers = "From: MNIOPS <uae@mniops.education>";
// Send the email to the applicant
mail($applicant_email, $applicant_subject, $applicant_message, $applicant_headers);
// Redirect the applicant to a thank-you page
header("Location: thank_you.html");
exit();
}
?>