From da57beb574fb9f756a7de036e8003f75ec47432c Mon Sep 17 00:00:00 2001 From: arf20 Date: Sat, 16 Mar 2024 02:51:06 +0100 Subject: Email verification --- config.php.example | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'config.php.example') diff --git a/config.php.example b/config.php.example index 5057641..6520aaa 100644 --- a/config.php.example +++ b/config.php.example @@ -6,6 +6,12 @@ define('DB_SERVER', 'hostname'); define('DB_USERNAME', 'username'); define('DB_PASSWORD', 'password'); define('DB_NAME', 'dbname'); + +define('MAIL_SERVER', 'mail.example.com'); +define('MAIL_PORT', 587); +define('MAIL_USER', 'user'); +define('MAIL_PASSWORD', 'password'); +define('MAIL_FROM', 'system@example.com'); /* Attempt to connect to MySQL database */ $link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); @@ -14,4 +20,16 @@ $link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } + +$mailer = new PHPMailer(); +$mailer->isSMTP(); +$mailer->SMTPDebug = SMTP::DEBUG_SERVER; +$mailer->Host = MAIL_SERVER; +$mailer->Port = MAIL_PORT; +$mailer->SMTPAuth = true; +$mailer->Username = MAIL_USER; +$mailer->Password = MAIL_PASSWORD; +$mailer->setFrom(MAIL_FROM); +$mailer->isHTML(false); + ?> -- cgit v1.2.3