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'); }
public function send(SMail $mail) { self::$mailQ[] = array('to' => $mail->get_to(), 'subject' => $mail->get_subject(), 'content' => $mail->get_content()); }
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(); }