public function send()
{
$output = false;
if (function_exists('mail')) {
foreach ($this->_toArray as $to) {
if ($to) {
$output = mail($to, $this->_subjectString, $this->_bodyString, $this->_headerString);
}
}
}
return $output;
}
/** * testMessage * * @since 2.2.0 * * @param array $toArray * @param array $fromArray * @param string $subject * @param mixed $body * @param array $attachmentArray * * @dataProvider providerMailer */ public function testMessage($toArray = [], $fromArray = [], $subject = null, $body = null, $attachmentArray = []) { /* setup */ $mailer = new Mailer(); $mailer->init($toArray, $fromArray, $subject, $body, $attachmentArray); /*compare */ $this->assertTrue(is_bool($mailer->send())); }