|
|
@ -117,16 +117,16 @@ class mBase extends publicBase { |
|
|
|
public static function sendMail($emails, $title, $content,$attr='') { |
|
|
|
include_once SERVER_ROOT . '/library/mail/class.phpmailer.php'; |
|
|
|
|
|
|
|
$mail_name = array_rand($GLOBALS['notice_qqmail_list']); |
|
|
|
$mail_name = array_rand($GLOBALS['notice_mail_list']); |
|
|
|
|
|
|
|
$mail = new PHPMailer(); |
|
|
|
$mail->IsSMTP(); |
|
|
|
$mail->Host = 'smtp.163.com'; |
|
|
|
$mail->Port = 587; // TCP 端口 |
|
|
|
$mail->SMTPSecure = 'tls'; // 启用 TLS 加密 |
|
|
|
$mail->Host = $GLOBALS['notice_mail_list'][$mail_name]['host']; |
|
|
|
$mail->Port = 465; // TCP 端口 |
|
|
|
$mail->SMTPSecure = 'ssl'; // 启用 TLS 加密 |
|
|
|
//$mail->SMTPDebug = 2; // 是否开启调试 |
|
|
|
$mail->Username = $mail_name; |
|
|
|
$mail->Password = $GLOBALS['notice_qqmail_list'][$mail_name]; |
|
|
|
$mail->Password = $GLOBALS['notice_mail_list'][$mail_name]['password']; |
|
|
|
$mail->From = $mail_name; |
|
|
|
$mail->CharSet = "utf-8"; |
|
|
|
$mail->IsHTML(true); |
|
|
|