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