From 328ffd24e0e3cf9f35db51d68b06e1f7e74e7047 Mon Sep 17 00:00:00 2001 From: arf20 Date: Thu, 28 Mar 2024 15:09:56 +0100 Subject: Update example config --- config.php.example | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'config.php.example') diff --git a/config.php.example b/config.php.example index c7397e3..c083592 100644 --- a/config.php.example +++ b/config.php.example @@ -26,14 +26,20 @@ if($link === false){ require("/usr/share/php/libphp-phpmailer/autoload.php"); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; -$mailer = new PHPMailer(); -$mailer->isSMTP(); -$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); + +$mailer = null; +function new_mail() { + $mailer = new PHPMailer(); + $mailer->isSMTP(); + $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); +} + +newmail(); ?> -- cgit v1.2.3