diff options
author | arf20 <aruizfernandez05@gmail.com> | 2024-03-16 02:51:06 +0100 |
---|---|---|
committer | arf20 <aruizfernandez05@gmail.com> | 2024-03-16 02:51:06 +0100 |
commit | da57beb574fb9f756a7de036e8003f75ec47432c (patch) | |
tree | b34bba686432f972816bb649d47431fcd2efa66e /config.php.example | |
parent | ecdcfff2460db708ae4b471140335ce47aaaf54b (diff) | |
download | arfnet2-cstims-da57beb574fb9f756a7de036e8003f75ec47432c.tar.gz arfnet2-cstims-da57beb574fb9f756a7de036e8003f75ec47432c.zip |
Email verification
Diffstat (limited to 'config.php.example')
-rw-r--r-- | config.php.example | 18 |
1 files changed, 18 insertions, 0 deletions
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); + ?> |