From contact update + subscribe handle

This commit is contained in:
Yves Gatesoupe 2020-07-14 19:07:00 +02:00
parent b73efeef26
commit 7fd377388a

View File

@ -1,6 +1,6 @@
<?php <?php
$errors = ''; $errors = '';
$myEmail = 'contact@astrolabe.coop'; // email address to send form content $myEmail = 'contact-form@astrolabe.coop'; // email address to send form content
if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) { if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) {
$errors .= "\n Error: all fields are required"; $errors .= "\n Error: all fields are required";
@ -48,7 +48,7 @@
$messageWrap = wordwrap($message, 70, "\r\n", false); $messageWrap = wordwrap($message, 70, "\r\n", false);
$emailBody = "Vous avez reçu un nouveau message depuis le formulaire du site Astrolabe :". $emailBody = "Vous avez reçu un nouveau message depuis le formulaire du site Astrolabe :".
"\r\n\r\nNom: $name \r\nEmail: $emailAddress \r\nRaison: $purpose\r\n\r\n$messageWrap"; "\r\n\r\nNom: $name \r\nEmail: $emailAddress \r\nRaison: $purpose\r\nSubscribe: $subscribe\r\n\r\n$messageWrap";
$emailBodyHTML = str_replace("\r\n", "<br>", $emailBody); $emailBodyHTML = str_replace("\r\n", "<br>", $emailBody);
@ -58,6 +58,7 @@
// if subscribe add to mailing list // if subscribe add to mailing list
if(!empty($subscribe)) { if(!empty($subscribe)) {
// process // process
// enovoi mail add to mailing list
} }
// redirect to the 'thank you' page // redirect to the 'thank you' page