From adfd77a64d0038997a998c2250ce0a539a1bd0f4 Mon Sep 17 00:00:00 2001 From: Anxhelo Lushka Date: Mon, 12 Mar 2018 20:38:43 +0100 Subject: [PATCH] Create form.php --- form.php | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 form.php diff --git a/form.php b/form.php new file mode 100644 index 0000000..83983f1 --- /dev/null +++ b/form.php @@ -0,0 +1,65 @@ +isSMTP(); + $mail->Host = 'localhost'; + $mail->Port = 2500; + $mail->CharSet = 'utf-8'; + //It's important not to use the submitter's address as the from address as it's forgery, + //which will cause your messages to fail SPF checks. + //Use an address in your own domain as the from address, put the submitter's address in a reply-to + $mail->setFrom('form@ura.design', (empty($name) ? 'Contact form' : $name)); + $mail->addAddress($to); + $mail->addReplyTo($email, $name); + $mail->Subject = 'Contact form: ' . $subject; + $mail->Body = "Contact form submission\n\n" . $projectname . $message . $budget; + if (!$mail->send()) { + $msg .= "Mailer Error: " . $mail->ErrorInfo; + } else { + $msg .= "Message sent!"; + } + } +} ?>