Beispiel #1
0
 public function test_message_without_a_content_should_throw()
 {
     $mail = new SMail($this->date);
     $mail->add_to('*****@*****.**', 'John Doe');
     $this->setExpectedException('SMailException', 'No body specified');
     $mail->get_content();
 }
Beispiel #2
0
 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');
 }
Beispiel #3
0
 public function send(SMail $mail) {
   self::$mailQ[] = array('to' => $mail->get_to(), 'subject' => $mail->get_subject(), 'content' => $mail->get_content());
 }