/** * Tests the IsHTML method. * * @covers JMail::IsHTML * * @return void */ public function testIsHTML() { $returnedObject = $this->object->isHtml(false); $this->assertThat('text/plain', $this->equalTo($this->object->ContentType)); // Test to ensure that a JMail object is being returned for chaining $this->assertInstanceOf('JMail', $returnedObject); }
/** * Launch notification * @return string */ public function notify() { if ($recipients = $this->_getRecipients()) { $body = JString::trim($this->renderBody()); if (empty($body)) { return null; } $this->_mailer->setSubject($this->_getMailSubject()); $this->_mailer->setSender($this->_getMailSender()); $this->_mailer->isHtml($this->_isHtml()); $this->_mailer->setBody($body); foreach ($recipients as $recEmail => $recName) { // send message $this->_mailer->addRecipient(array($recEmail, $recName)); $this->_mailer->send(); $this->_mailer->ClearAllRecipients(); if ($this->_isSleep()) { // simple antispam sleep(1); } } } }
/** * Tests the IsHTML method. * * @covers JMail::IsHTML * * @return void */ public function testIsHtml() { $this->object->isHtml(false); $this->assertThat('text/plain', $this->equalTo($this->object->ContentType)); }