diff --git a/.gitignore b/.gitignore index e32e984..7cb005c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ utils/.caldav_pass content/pages/termine.md lighttpd.conf newsletter.sqlite +config.ini diff --git a/content/images/tr/motif-fireworks.jpg b/content/images/tr/motif-fireworks.jpg new file mode 100644 index 0000000..9fd931a Binary files /dev/null and b/content/images/tr/motif-fireworks.jpg differ diff --git a/content/images/tr/motif-termine-towfiqu-barbhuiya-unsplash.jpg b/content/images/tr/motif-termine.jpg similarity index 100% rename from content/images/tr/motif-termine-towfiqu-barbhuiya-unsplash.jpg rename to content/images/tr/motif-termine.jpg diff --git a/content/js/Message.js b/content/js/Message.js index 09e3dba..dcaa37c 100644 --- a/content/js/Message.js +++ b/content/js/Message.js @@ -1,8 +1,8 @@ let query = new URLSearchParams(location.search); -let msg = 'keine Fehlermeldung gefunden'; +let msg = 'keine Statusmeldung gefunden'; if (query.has('msg')) { msg = query.get('msg'); } -if ( document.getElementById('error-msg').firstChild != null ) { - document.getElementById('error-msg').firstChild.nodeValue = msg; +if ( document.getElementById('msg').firstChild != null ) { + document.getElementById('msg').firstChild.nodeValue = msg; } diff --git a/content/pages/danke.md b/content/pages/danke.md index d8f3467..64858df 100644 --- a/content/pages/danke.md +++ b/content/pages/danke.md @@ -1,11 +1,16 @@ --- -title: Kleines Dankeschön +title: Du bist Abonnent! date: 2025-02-04 10:20 author: Tobias Radloff summary: Danke für deine Nachricht. lang: de slug: danke save_as: newsletter/danke.html +featured_image: + - pic: ../images/tr/motif-fireworks.jpg + alt: prächtige Feuerwerksraketen explodieren am Nachthimmel über einem See + credit: Ray Hennessy | unsplash.com + credit_link: https://unsplash.com/@rayhennessy --- Klasse, dass du dich für meinen Newsletter angemeldet hast. Als kleines Dankeschön und um die Wartezeit auf die nächste Ausgabe zu verkürzen, ist hier ein bislang unveröffentlichtes Gedicht von mir. Viel Spaß :-) diff --git a/content/pages/error.md b/content/pages/error.md index 978c878..a173446 100644 --- a/content/pages/error.md +++ b/content/pages/error.md @@ -13,9 +13,9 @@ featured_image: credit_link: https://unsplash.com/@elisa_ventur --- -Verflixt, es ist ein Fehler bei der Newsletter-Verwaltung aufgetreten. Vielleicht hilft dir die Fehlermeldung weiter? +Verflixt, es ist ein Fehler bei der Newsletter-Verwaltung aufgetreten. Vielleicht hilft dir die Statusmeldung weiter? -`suche Fehlermeldung`{: #error-msg} +`suche Statusmeldung`{: #msg} diff --git a/content/pages/success.md b/content/pages/success.md index d2f03dd..cdc5a22 100644 --- a/content/pages/success.md +++ b/content/pages/success.md @@ -13,6 +13,8 @@ featured_image: credit_link: https://unsplash.com/@ianstauffer --- +
Erfolg auf der ganzen Linie.
+ [← zur Startseite](/) diff --git a/content/pages/termine.md.metadata b/content/pages/termine.md.metadata index e555a47..4f511dd 100644 --- a/content/pages/termine.md.metadata +++ b/content/pages/termine.md.metadata @@ -8,7 +8,7 @@ slug: termine url: termine/ save_as: termine/index.html featured_image: - - pic: ../images/tr/motif-termine-towfiqu-barbhuiya-unsplash.jpg + - pic: ../images/tr/motif-termine.jpg alt: in einem Kalender stecken rote Reißzwecken und ein Tag ist rot eingekringelt credit: Towfiqu barbhuiya | unsplash.com credit_link: https://unsplash.com/@towfiqu999999 \ No newline at end of file diff --git a/content/php/confirm.php b/content/php/confirm.php index c99fc4a..77dcaef 100644 --- a/content/php/confirm.php +++ b/content/php/confirm.php @@ -1,7 +1,7 @@ 'tobias-radloff.de', */ 'domain' => 'localhost', // string concatenated with email address to create a non-recreatable md5 hash - 'uniqueKey' => '***REMOVED***', // works like password salt + 'uniqueKey' => $ini['hash']['uniqueKey'], // works like password salt // file name of confirm script 'confirmScript' => '/newsletter/confirm.php', // status code to be used when redirection to success or error page @@ -33,28 +37,8 @@ $general = [ // complete site URL $general['siteURL'] = 'https://' . $general['domain']; -// SMTP server information -$smtp = [ - 'host' => '***REMOVED*** - 'port' => 587, - 'username' => 'tobias', - 'password' => '***REMOVED***', - 'auth' => TRUE, -]; - -// database information -$db = [ - 'sqlite' => [ - 'dsn' => 'sqlite:../../newsletter.sqlite', - ], - 'mysql' => [ - 'dsn' => '', - 'host' => '', - 'port' => '', - 'username' => '', - 'password' => '' - ] -]; +$smtp = $ini['smtp']; +$db = $ini['db']; function GetConfirmationHash($confEmail) { global $general; @@ -68,22 +52,22 @@ function getPDO($dbType = 'sqlite') { } // Sends an email to single recipient with subject, body and sender info specified in an array -function SendEmail($recipientAddress, $mailContents) { +function SendEmail($toAddress, $mailContents) { global $general, $smtp; $mail = new PHPMailer(true); //Server settings - // $mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output + //$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output $mail->isSMTP(); $mail->Host = $smtp['host']; + $mail->Port = $smtp['port']; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` $mail->SMTPAuth = $smtp['auth']; $mail->Username = $smtp['username']; $mail->Password = $smtp['password']; //$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption - $mail->Port = $smtp['port']; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` // recipient - $mail->addAddress($recipientAddress); //Add a recipient + $mail->addAddress($toAddress); // content $mail->CharSet = 'UTF-8'; diff --git a/content/php/subscribe.php b/content/php/subscribe.php index 1bc888a..119ef7c 100644 --- a/content/php/subscribe.php +++ b/content/php/subscribe.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/content/php/unsubscribe.php b/content/php/unsubscribe.php index ef636c0..c308d41 100644 --- a/content/php/unsubscribe.php +++ b/content/php/unsubscribe.php @@ -1,6 +1,6 @@