public function testSend() { $mailer = new Baobei_Mailer(true); $service = new AD(); $_SESSION['id'] = $_SESSION['role'] = 'test'; $ad_id = '946afe0b64e3003890c0325dc7c4c408'; $info = $service->get_ad_info(array('id' => $ad_id), 0, 1); $this->assertTrue($mailer->send('*****@*****.**', 'test', $info)); }
/** * 发送报备邮件 * * @param $to * @param $attr * * @return bool */ private function baobei($to, $attr) { $mail = new Baobei_Mailer(); $subject = '无限点乐广告报备邮件'; return $mail->send($to, $subject, $attr); }