///// Send Email To HR Function /////
function sendEmailToHR($pdf, $resume, $enquirydata){
$emailbody .='<h1>Employment Application from ' . $enquirydata['First Name'] . ' ' .         $enquirydata['Last Name'] . '</h1>';
foreach ($enquirydata as $title => $data){
    if(!empty($title) && !empty($data)){
         $emailbody.= '<strong>' . $title . ': </strong>' . $data .'<br>';   
    }
}
//////Mail Server Settings then second email
if (isset($_REQUEST['email'])){
    $fname = $_REQUEST['fname'];
    $lname = $_REQUEST['lname'];   
$email = $_REQUEST['email'];
$to = $email;
$respond_message = "message"
mail($email, $subject, $respond_message);
///// Mail Server settings for second email I am using a concatenated string to hold in a temporary location the items submitted in the HTML form.
 
    
SCR Employment Application from ' . $enquirydata['First Name'] . ' ' . $enquirydata['Last Name'] . '
'; foreach ($enquirydata as $title => $data){ if(!empty($title) && !empty($data)){ $emailbody.= '' . $title . ': ' . $data .''; } } /// then mail server settings – Sun City Roseville Jul 29 '22 at 23:05