diff --git a/public/categories/index.html b/public/categories/index.html index d00c2ad..e9ccc5f 100755 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -137,14 +137,14 @@ diff --git a/public/de/404.html b/public/de/404.html index 8caee7c..37a9928 100755 --- a/public/de/404.html +++ b/public/de/404.html @@ -136,14 +136,14 @@ diff --git a/public/de/sitemap.xml b/public/de/sitemap.xml index 3ce8530..a78d503 100755 --- a/public/de/sitemap.xml +++ b/public/de/sitemap.xml @@ -20,6 +20,11 @@ /> http://markinstefan.xyz/de/categories/ + - http://markinstefan.xyz/de/hochzeit/ http://markinstefan.xyz/categories/ + - http://markinstefan.xyz/contact/ http://markinstefan.xyz/tags/ - + diff --git a/public/rsvp-submit.php b/public/rsvp-submit.php index 88c3851..2219ab5 100755 --- a/public/rsvp-submit.php +++ b/public/rsvp-submit.php @@ -1,6 +1,5 @@ safeLoad(); - function checkboxArrayToString($value) { if (is_array($value) && count($value) > 0) { @@ -39,8 +37,8 @@ $first_name = trim($_POST['first_name'] ?? ''); $last_name = trim($_POST['last_name'] ?? ''); $name = trim("$first_name $last_name"); -$email = trim($_POST['email'] ?? ''); -$phone = trim($_POST['phone'] ?? ''); +$email = trim($_POST['email'] ?? ''); +$phone = trim($_POST['phone'] ?? ''); // Attendance $attendance = $_POST['attendance'] ?? 'Unknown'; @@ -107,12 +105,13 @@ try { $mail->CharSet = 'UTF-8'; $mail->isSMTP(); - $mail->Host = gethostbyname($_ENV['SMTP_HOST']); + $mail->Host = $_ENV['SMTP_HOST']; $mail->SMTPAuth = true; $mail->Username = $_ENV['SMTP_USER']; $mail->Password = $_ENV['SMTP_PASS']; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = (int)$_ENV['SMTP_PORT']; + $mail->Timeout = 10; $mail->setFrom($_ENV['FROM_EMAIL'], $_ENV['FROM_NAME']); $mail->addAddress($_ENV['TO_EMAIL']); @@ -196,7 +195,6 @@ EOD; $mail->Body = $body; -$mail->Timeout = 10; $mail->send(); header('Location: /thank-you/'); @@ -204,5 +202,8 @@ $mail->Timeout = 10; } catch (Exception $e) { - echo "RSVP could not be sent. Mailer Error: {$mail->ErrorInfo}"; + error_log('RSVP mail error: ' . $mail->ErrorInfo); + + http_response_code(500); + echo 'An error occurred while sending the RSVP.'; } diff --git a/public/ru/categories/index.html b/public/ru/categories/index.html index fdd3de6..90c5031 100755 --- a/public/ru/categories/index.html +++ b/public/ru/categories/index.html @@ -137,14 +137,14 @@ diff --git a/public/ru/index.html b/public/ru/index.html index 8266e40..a76c1ac 100755 --- a/public/ru/index.html +++ b/public/ru/index.html @@ -138,14 +138,14 @@ diff --git a/public/ru/series/index.html b/public/ru/series/index.html index cee8a31..6dbfdab 100755 --- a/public/ru/series/index.html +++ b/public/ru/series/index.html @@ -137,14 +137,14 @@ diff --git a/public/ru/sitemap.xml b/public/ru/sitemap.xml index acdf2e8..685feae 100755 --- a/public/ru/sitemap.xml +++ b/public/ru/sitemap.xml @@ -20,6 +20,11 @@ /> http://markinstefan.xyz/ru/categories/ + - http://markinstefan.xyz/ru/series/ - - - http://markinstefan.xyz/ru/tags/ + + http://markinstefan.xyz/ru/tags/ + http://markinstefan.xyz/ru/contact/ http://markinstefan.xyz/ru/ - 🇷🇺 + 🇩🇪 diff --git a/static/rsvp-submit.php b/static/rsvp-submit.php index 88c3851..2219ab5 100755 --- a/static/rsvp-submit.php +++ b/static/rsvp-submit.php @@ -1,6 +1,5 @@ safeLoad(); - function checkboxArrayToString($value) { if (is_array($value) && count($value) > 0) { @@ -39,8 +37,8 @@ $first_name = trim($_POST['first_name'] ?? ''); $last_name = trim($_POST['last_name'] ?? ''); $name = trim("$first_name $last_name"); -$email = trim($_POST['email'] ?? ''); -$phone = trim($_POST['phone'] ?? ''); +$email = trim($_POST['email'] ?? ''); +$phone = trim($_POST['phone'] ?? ''); // Attendance $attendance = $_POST['attendance'] ?? 'Unknown'; @@ -107,12 +105,13 @@ try { $mail->CharSet = 'UTF-8'; $mail->isSMTP(); - $mail->Host = gethostbyname($_ENV['SMTP_HOST']); + $mail->Host = $_ENV['SMTP_HOST']; $mail->SMTPAuth = true; $mail->Username = $_ENV['SMTP_USER']; $mail->Password = $_ENV['SMTP_PASS']; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = (int)$_ENV['SMTP_PORT']; + $mail->Timeout = 10; $mail->setFrom($_ENV['FROM_EMAIL'], $_ENV['FROM_NAME']); $mail->addAddress($_ENV['TO_EMAIL']); @@ -196,7 +195,6 @@ EOD; $mail->Body = $body; -$mail->Timeout = 10; $mail->send(); header('Location: /thank-you/'); @@ -204,5 +202,8 @@ $mail->Timeout = 10; } catch (Exception $e) { - echo "RSVP could not be sent. Mailer Error: {$mail->ErrorInfo}"; + error_log('RSVP mail error: ' . $mail->ErrorInfo); + + http_response_code(500); + echo 'An error occurred while sending the RSVP.'; }