From 3018a9c8d8f16740602540d97e3b0b5db002f9e6 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Thu, 1 Jul 2021 16:41:10 -0400 Subject: finished mailing form, updated policies --- index.php | 64 ++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 15 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 094f670..a726a08 100644 --- a/index.php +++ b/index.php @@ -356,23 +356,9 @@
- -

Contact

+ @@ -383,6 +369,54 @@ + + isSMTP(); + $mail->Host = 'smtp.gmail.com'; + $mail->Port = 465; + $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; + $mail->SMTPAuth = true; + $mail->Username = $smtpuser; + $mail->Password = $smtppass; + $mail->setFrom($smtpuser, $name); + $mail->addReplyTo($email, $name); + $mail->addAddress($address); + $mail->Subject = 'Tutoring Inquiry'; + $mail->Body = $body; + + if (!$mail->send()) { + echo 'There was a problem sending your message. Please try again later or call (757) 335-7555.'; + echo ''; + } else { + echo "Your message was successfully sent."; + } + } else { + echo "Send us a message and we'll reply by mail as soon as possible. Please note that your email address will not be stored on our server. It will only be used to contact you with a reply."; + } + ?>
-- cgit v1.2.3