reset changes
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 1m1s
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 1m1s
This commit is contained in:
parent
84ba88a99f
commit
4f1818a75e
1 changed files with 2 additions and 5 deletions
|
|
@ -19,7 +19,6 @@ try {
|
||||||
$email = filter_var(trim(filter_input(INPUT_POST, 'email')), FILTER_SANITIZE_EMAIL);
|
$email = filter_var(trim(filter_input(INPUT_POST, 'email')), FILTER_SANITIZE_EMAIL);
|
||||||
$subject = strip_tags(trim(filter_input(INPUT_POST, 'formularart')));
|
$subject = strip_tags(trim(filter_input(INPUT_POST, 'formularart')));
|
||||||
// Construct the message using the function from message.php
|
// Construct the message using the function from message.php
|
||||||
$messageHD = constructMessageHelpDesk();
|
|
||||||
$message = constructMessage();
|
$message = constructMessage();
|
||||||
if (empty($name) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) {
|
if (empty($name) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) {
|
||||||
// Invalid input
|
// Invalid input
|
||||||
|
|
@ -47,8 +46,8 @@ try {
|
||||||
$mail->CharSet = 'UTF-8';
|
$mail->CharSet = 'UTF-8';
|
||||||
$encodedSubject = mb_encode_mimeheader($subject, "UTF-8", "Q");
|
$encodedSubject = mb_encode_mimeheader($subject, "UTF-8", "Q");
|
||||||
$mail->Subject = $encodedSubject;
|
$mail->Subject = $encodedSubject;
|
||||||
$mail->Body = nl2br(htmlspecialchars($messageHD));
|
$mail->Body = nl2br(htmlspecialchars($message));
|
||||||
$mail->AltBody = htmlspecialchars($messageHD);
|
$mail->AltBody = htmlspecialchars($message);
|
||||||
|
|
||||||
// Send email
|
// Send email
|
||||||
if ($mail->send()) {
|
if ($mail->send()) {
|
||||||
|
|
@ -63,10 +62,8 @@ try {
|
||||||
|
|
||||||
$customerMessage = constructCustomerMessage($message, $lang);
|
$customerMessage = constructCustomerMessage($message, $lang);
|
||||||
|
|
||||||
// $adressReplyTo = ($lang == "FR" ? "contact@verua.ch" : "kontakt@verua.ch");
|
|
||||||
$mail->clearAddresses();
|
$mail->clearAddresses();
|
||||||
$mail->ClearBCCs();
|
$mail->ClearBCCs();
|
||||||
$mail->addReplyTo('kontakt@verua.ch', 'VeruA AG - Support-Team'); // Sender address
|
|
||||||
$mail->addBCC('rabe@verua.swiss'); // Add bounce email address as BCC
|
$mail->addBCC('rabe@verua.swiss'); // Add bounce email address as BCC
|
||||||
$mail->addAddress($customerEmail);
|
$mail->addAddress($customerEmail);
|
||||||
$mail->Subject = $encodedSubject;
|
$mail->Subject = $encodedSubject;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue