mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-27 19:11:52 +00:00
96d4a3ecf7
Due to historical reasons, the code is in subfolder "1". With SVN removal, we place the code back and remove the annoying "1" folder.
21 lines
729 B
PHP
21 lines
729 B
PHP
<?php
|
|
|
|
require $_SERVER['DOCUMENT_ROOT'].'/app/vendor/phpmailer/PHPMailerAutoload.php';
|
|
|
|
class UOJMail {
|
|
public static function noreply() {
|
|
$mailer = new PHPMailer();
|
|
$mailer->isSMTP();
|
|
$mailer->Host = UOJConfig::$data['mail']['noreply']['host'];
|
|
$mailer->Port = UOJConfig::$data['mail']['noreply']['port'];
|
|
$mailer->SMTPAuth = true;
|
|
$mailer->SMTPSecure = UOJConfig::$data['mail']['noreply']['secure'];
|
|
$mailer->Username = UOJConfig::$data['mail']['noreply']['username'];
|
|
$mailer->Password = UOJConfig::$data['mail']['noreply']['password'];
|
|
$mailer->setFrom(UOJConfig::$data['mail']['noreply']['username'], "UOJ noreply");
|
|
$mailer->CharSet = "utf-8";
|
|
$mailer->Encoding = "base64";
|
|
return $mailer;
|
|
}
|
|
}
|