예제 #1
0
파일: sendmail.php 프로젝트: Kervinou/OBM
 public function send(SMail $mail)
 {
     $to = $mail->get_to();
     $subject = $mail->get_subject();
     
     $result = mail($to, $subject, $mail->get_content(), $mail->get_non_matching_header_lines(array('To', 'Subject')), '-f '.$mail->get_return_path());
     
     if (!$result) throw new Exception('Unable to send mail');
 }
예제 #2
0
 public function send(SMail $mail) {
   self::$mailQ[] = array('to' => $mail->get_to(), 'subject' => $mail->get_subject(), 'content' => $mail->get_content());
 }
예제 #3
0
파일: MailTest.php 프로젝트: Kervinou/OBM
 public function test_message_without_a_to_should_throw()
 {
     $mail = new SMail($this->date);
     $this->setExpectedException('SMailException', 'To: recipient is not specified');
     $mail->get_to();
 }