From 3d49f206f9d8b29928dc08458f5563b6fd9214ff Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Fri, 5 Sep 2025 22:40:39 -0700 Subject: New blog post 05 SEPT 2025 --- contact.php | 60 ------------------------------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 contact.php (limited to 'contact.php') diff --git a/contact.php b/contact.php deleted file mode 100644 index 320a801..0000000 --- a/contact.php +++ /dev/null @@ -1,60 +0,0 @@ -isSMTP(); - $mail->Host = 'smtp.gmail.com'; - $mail->SMTPAuth = true; - $mail->Username = getenv("SMTP_EMAIL"); // Get email from environment variable - $mail->Password = getenv("SMTP_PASSWORD"); // Get password from environment variable - $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; - $mail->Port = 587; - - // Set email details - $mail->setFrom($email, $name); - $mail->addAddress(getenv("RECEIVER_EMAIL")); // Receiver's email - - $mail->Subject = "New Contact Form Submission from $name"; - $mail->Body = "From: $name <$email>\n\n$message"; - - // Send email - $mail->send(); - echo "Message sent successfully!"; - } catch (Exception $e) { - echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; - } -} -?> -- cgit v1.2.3