From 1dd30c2f754eb560081fb0582a5baa80af4a690d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Mon, 18 Mar 2024 10:34:55 +0100 Subject: [PATCH] refactor(contact-handler.php): PSR2 autoformat --- src/form/contact-form-handler.php | 204 +++++++++++++++--------------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/src/form/contact-form-handler.php b/src/form/contact-form-handler.php index 04d0506..937b36d 100644 --- a/src/form/contact-form-handler.php +++ b/src/form/contact-form-handler.php @@ -1,102 +1,102 @@ -", $emailBody); - - $mail->isSMTP(); - $mail->Host = getenv('ASTRO_SMTP_HOSTNAME'); - $mail->SMTPAuth = true; - $mail->Username = getenv('ASTRO_SMTP_USERNAME'); - $mail->Password = getenv('ASTRO_SMTP_PASSWORD'); - $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; - $mail->Port = 587; - - //Options - $mail->CharSet = 'UTF-8'; - $mail->WordWrap = 70; - - //Recipients - $mail->setFrom($myEmail); - $mail->addAddress($myEmail); - $mail->addReplyTo($emailAddress, $name); - - // Content - $mail->isHTML(true); - $mail->Subject = $emailSubject; - $mail->Body = $emailBodyHTML; - $mail->AltBody = $emailBody; - - $mail->send(); - - // if subscribe add to mailing list - if(!empty($subscribe)) { - // process - // enovoi mail add to mailing list - } - - // redirect to the 'thank you' page - header("Location: /thank-you/index.html"); - } -?> - - - - Contact form handler - - - - - - - +", $emailBody); + + $mail->isSMTP(); + $mail->Host = getenv('ASTRO_SMTP_HOSTNAME'); + $mail->SMTPAuth = true; + $mail->Username = getenv('ASTRO_SMTP_USERNAME'); + $mail->Password = getenv('ASTRO_SMTP_PASSWORD'); + $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; + $mail->Port = 587; + + //Options + $mail->CharSet = 'UTF-8'; + $mail->WordWrap = 70; + + //Recipients + $mail->setFrom($myEmail); + $mail->addAddress($myEmail); + $mail->addReplyTo($emailAddress, $name); + + // Content + $mail->isHTML(true); + $mail->Subject = $emailSubject; + $mail->Body = $emailBodyHTML; + $mail->AltBody = $emailBody; + + $mail->send(); + + // if subscribe add to mailing list + if(!empty($subscribe)) { + // process + // enovoi mail add to mailing list + } + + // redirect to the 'thank you' page + header("Location: /thank-you/index.html"); +} +?> + + + + Contact form handler + + + + + + +