PHPMailer neu implementiert
This commit is contained in:
10
inc/db.php
10
inc/db.php
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
include('secure.php');
|
||||
|
||||
include_once __DIR__ . '/secure.php';
|
||||
|
||||
// Verbindung herstellen
|
||||
$conn = mysqli_connect($host, $user, $password, $dbname);
|
||||
|
||||
// Zeitzone der MySQL-Sitzung auf UTC setzen
|
||||
$conn->query("SET time_zone = '+00:00';");
|
||||
$conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
|
||||
|
||||
// Verbindung prüfen
|
||||
if (!$conn) {
|
||||
die("Verbindung zur Datenbank fehlgeschlagen: " . mysqli_connect_error());
|
||||
}
|
||||
|
||||
mysqli_set_charset($conn, "utf8");
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Service Worker Registration -->
|
||||
<script>
|
||||
// Automatische Update-Erkennung
|
||||
|
||||
@@ -74,3 +74,14 @@ function darken_color($hex, $darken_amount = 40)
|
||||
|
||||
return '#' . str_pad(dechex($rgb['r']), 2, '0', STR_PAD_LEFT) . str_pad(dechex($rgb['g']), 2, '0', STR_PAD_LEFT) . str_pad(dechex($rgb['b']), 2, '0', STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
//Mail Funktion
|
||||
function send_email_notification($to, $subject, $message)
|
||||
{
|
||||
$headers = 'From: noreply@domili.de' . "\r\n" .
|
||||
'Reply-To: noreply@domili.de' . "\r\n" .
|
||||
'X-Mailer: PHP/' . phpversion() . "\r\n" .
|
||||
'Content-Type: text/plain; charset=UTF-8';
|
||||
|
||||
return mail($to, $subject, $message, $headers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user