diff options
-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(); ?> |