Merge branch 'contactform' into staging
All checks were successful
Deploy Hugo / deploy (push) Successful in 37s

This commit is contained in:
Jens M. Sauer 2024-10-24 13:17:32 +02:00
commit da1b1a4fc3
4 changed files with 28 additions and 4 deletions

View File

@ -7,6 +7,9 @@ title: Banner
params: params:
subtitle: Benvenuto und herzlich Willkommen! subtitle: Benvenuto und herzlich Willkommen!
style: style1 orient-left content-align-left image-position-center fullscreen onload-image-fade-in onload-content-fade-right style: style1 orient-left content-align-left image-position-center fullscreen onload-image-fade-in onload-content-fade-right
button:
link: Kontakt
label: Jetzt Kontakt aufnehmen
--- ---
Aus Italien auf Ihre Feier in Norddeutschland. Aus Italien auf Ihre Feier in Norddeutschland.

View File

@ -3,6 +3,30 @@
<div class="inner"> <div class="inner">
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
<p>{{ .Content }}</p> <p>{{ .Content }}</p>
<br>
<h3>Oder verwendet das Kontaktformular</h3>
<form id="contactForm">
<div class="fields">
<div class="field half">
<label for="name">Name:</label>
<input type="text" name="name" id="name" required>
</div>
<div class="field half">
<label for="email">E-Mail:</label>
<input type="email" name="email" id="email" required>
</div>
<div class="field">
<label for="message">Nachricht:</label>
<textarea name="message" id="message" rows="5" required></textarea>
</div>
</div>
<ul class="actions">
<li>
<button type="submit">Absenden</button>
</li>
</ul>
</form>
<div id="responseMessage" style="margin-top:20px;"></div>
</div> </div>
</section> </section>
{{ end }} {{ end }}

View File

@ -17,8 +17,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
try { try {
// SMTP-Einstellungen aus der Konfigurationsdatei laden // SMTP-Einstellungen aus der Konfigurationsdatei laden
$mail->isSMTP(); $mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->Debugoutput = 'echo';
$mail->Host = $config['smtp']['host']; $mail->Host = $config['smtp']['host'];
$mail->SMTPAuth = true; $mail->SMTPAuth = true;
$mail->Username = $config['smtp']['username']; $mail->Username = $config['smtp']['username'];
@ -36,7 +34,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$mail->AltBody = "Name: $name\nE-Mail: $email\nNachricht: $message"; $mail->AltBody = "Name: $name\nE-Mail: $email\nNachricht: $message";
$mail->addReplyTo($email, $name); $mail->addReplyTo($email, $name);
print_r($config);
$mail->send(); $mail->send();
echo 'Nachricht wurde erfolgreich gesendet.'; echo 'Nachricht wurde erfolgreich gesendet.';
} catch (Exception $e) { } catch (Exception $e) {

@ -1 +1 @@
Subproject commit 0958fb404d10da595f9266b92987aff17d9b0a76 Subproject commit fdcad5ff5ea4afd360adf067f49730990a8664bc