function send_email2($email = '*****@perspectivar.com'){ $this->autoRender = false; date_default_timezone_set('PRC'); require "../Lib/mail/class.smtp.php"; // 引入smtp核心类 require "../Lib/mail/class.phpmailer.php"; // 引入PHPMailer核心类 $mail = new PHPMailer; $mail->CharSet = "UTF-8"; $mail->isSMTP(); $mail->SMTPAuth=true; $mail->SMTPKeepAlive=true; $mail->SMTPSecure= "ssl"; $mail->Host="smtp.qq.com"; $mail->Port=465; $mail->Username = "9*****67"; $mail->Password = "ito***hqxmbffi"; $mail->From="93***067@qq.com"; $mail->FromName="慧慧"; $mail->WordWrap=50; $mail->addReplyTo('replyto@example.com', 'First Last'); $mail->addAddress($email, '尊敬的客户'); $mail->Subject = '出入金通知!'; $mail->msgHTML('有出入金待您审批!'); if (!$mail->send()) { echo $this->output(false,"Mailer Error: " . $mail->ErrorInfo); } else { echo $this->output(true,"Message sent!"); } }