aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/mail.controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/mail.controller.php')
-rw-r--r--app/controllers/mail.controller.php31
1 files changed, 0 insertions, 31 deletions
diff --git a/app/controllers/mail.controller.php b/app/controllers/mail.controller.php
deleted file mode 100644
index ce593d6..0000000
--- a/app/controllers/mail.controller.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-use PHPMailer\PHPMailer\PHPMailer;
-use PHPMailer\PHPMailer\Exception;
-
-$form = new Form(
- $name = $_POST['26471'] ?? null,
- $email = $_POST['26472'] ?? null,
- $message = $_POST['26478'] ?? null
-);
-
-$validEmail = PHPMailer::validateAddress($email, 'auto');
-
-if ($validEmail === false ) {
- $mailError = 'Invalid email' . "\r" . '<em>'. $email . '</em>';
- include '../app/views/mail-error.view.php';
- return;
-}
-
-require '../app/views/mail-sent.view.php';
-
-fastcgi_finish_request();
-$form->isSubmit();
-
-$contact['database']->insert(
- 'contactform', [
- 'name' => $form->name,
- 'email' => $form->email,
- 'message' => $form->message,
- ]
-);