' . "\r\n"; //Function to make the contact form into a string, and send it $result = mail($to, $email_subject, $body, $headers); /* -------------------------------------------------------------------------- */ // ----| CONFIRMATION EMAIL CODE |---- //Outputs the email content to user //Please note "\n" creates a line break $confirm_subject = CONFIRM_EMAIL_SUBJECT; $confirm_body = " Hi $name \n \n Thank you for contacting me,\n I will be in touch with you soon. \n \n Kind regards, \n " . CONFIRM_EMAIL_SIGNATURE; //Sets the recipient of the confirmation email $confirm_to = $email; //Sets who the email is from $confirm_headers .= 'From: <' . CONFIRM_EMAIL_FROM . '>' . "\r\n"; //Function to make the contact form into a string, and send it mail($confirm_to, $confirm_subject, $confirm_body, $confirm_headers); /* -------------------------------------------------------------------------- */ //Outputs a message to say the form has been submitted if ($result == true) { //if there are no errors, output this message. $success = "Your message has been successfully sent."; } else { $error = "Sending failed."; } } } ?>