1
1
mirror of https://github.com/renbaoshuo/S2OJ.git synced 2025-01-14 06:41:52 +00:00
S2OJ/web/app/models/UOJMail.php

21 lines
683 B
PHP

<?php
use PHPMailer\PHPMailer\PHPMailer;
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;
}
}