Added transport class for MailOutput.

This commit is contained in:
2016-08-04 15:52:59 +02:00
parent f237e37a28
commit 1af2c621f4
4 changed files with 45 additions and 3 deletions

View File

@ -98,7 +98,10 @@ class MailOutput extends GenericOutput
$this->setHeadersFromString($headers);
$recipients = implode(', ', $this->recipients);
// TODO: Check if any recipients in the first place
$mail_sent = mail($recipients, $this->subject, $mailbody, $this->getHeaders());
return $mail_sent;
$this->transport->setRecipients($recipients);
$this->transport->setSubject($this->subject);
$this->transport->setHeaders($this->getHeaders());
$this->transport->setContent($mailbody);
return $this->transport->send();
}
}