diff options
author | arf20 <aruizfernandez05@gmail.com> | 2024-03-28 15:09:56 +0100 |
---|---|---|
committer | arf20 <aruizfernandez05@gmail.com> | 2024-03-28 15:09:56 +0100 |
commit | 328ffd24e0e3cf9f35db51d68b06e1f7e74e7047 (patch) | |
tree | 028342b287aa21487e76a3831e1fcf849b074524 /config.php.example | |
parent | 2e9d1536912b2b10487625bb8a6629c22bd39513 (diff) | |
download | arfnet2-cstims-328ffd24e0e3cf9f35db51d68b06e1f7e74e7047.tar.gz arfnet2-cstims-328ffd24e0e3cf9f35db51d68b06e1f7e74e7047.zip |
Update example config
Diffstat (limited to 'config.php.example')
-rw-r--r-- | config.php.example | 24 |
1 files changed, 15 insertions, 9 deletions
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(); ?> |