fixit_submit.php

success) { // CAPTCHA PASSED: Process your form and send the email $name = htmlspecialchars($_POST['name']); // Sanitize inputs $email = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL); if ($email) { $to = "webmaster@templeofanderson.com"; // Your target IONOS mailbox $subject = "Fix it Form Submission " . $name; $message = "You have received a new secure message from your web form."; $headers = "From: webmaster@templeofanderson\r\nReply-To: " . $email; if (mail($to, $subject, $message, $headers)) { echo "Message successfully sent!"; } else { echo "Mailer error. Please check your IONOS mail settings."; } } else { echo "Invalid email address."; } } else { // CAPTCHA FAILED echo "Spam bot behavior detected. Please complete the CAPTCHA check."; } } else { echo "Invalid request method."; } require_once "Mail.php"; $from = 'info@templeofanderson.com'; $to = 'webmaster@templeofanderson.com'; $subject = "Fix it Form Submission"; $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $body = "From: $name\n Email:\ n $email\n Subject:\n $subject\n Message:\n $message"; $host = "ssl://smtp.ionos.com"; $port = "465"; $username = "webmaster@templeofanderson.com"; $password = 'Zeke@29621'; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("

" . $mail->getMessage() . "

"); } else { echo("

Message successfully sent!

"); } ?>

 

Home Contact Page