|
|
@ -114,7 +114,7 @@ class mBase extends publicBase { |
|
|
|
* @param string $title 邮件标题 |
|
|
|
* @param string $content 邮件内容 |
|
|
|
*/ |
|
|
|
public static function sendMail($emails, $title, $content) { |
|
|
|
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']); |
|
|
@ -122,7 +122,8 @@ class mBase extends publicBase { |
|
|
|
$mail = new PHPMailer(); |
|
|
|
$mail->IsSMTP(); |
|
|
|
$mail->Host = 'smtp.163.com'; |
|
|
|
$mail->Port = 465; |
|
|
|
$mail->Port = 587; |
|
|
|
$mail->SMTPSecure = 'tls'; // 启用 TLS 加密 |
|
|
|
$mail->Username = $mail_name; |
|
|
|
$mail->Password = $GLOBALS['notice_qqmail_list'][$mail_name]; |
|
|
|
$mail->From = $mail_name; |
|
|
@ -132,6 +133,10 @@ class mBase extends publicBase { |
|
|
|
$mail->ClearAddresses(); |
|
|
|
$mail->SetLanguage('en', SERVER_ROOT . '/library/mail/language/'); |
|
|
|
|
|
|
|
if($attr){ |
|
|
|
$mail->addAttachment($attr); |
|
|
|
} |
|
|
|
|
|
|
|
$mail->FromName = "快乐论文"; |
|
|
|
foreach($emails as $email) { |
|
|
|
$mail->AddAddress($email); |
|
|
|