- Updates mailers to use HTML and/or TEXT body

This commit is contained in:
MrCasual
2015-12-04 14:06:43 -05:00
parent 1f06a7dd0b
commit 6dbe338b01
8 changed files with 60 additions and 29 deletions

View File

@ -22,13 +22,18 @@ class MailGun {
}
function getBody($newsletter, $subscriber) {
return array(
$body = array(
'from' => $this->from,
'to' => $subscriber,
'subject' => $newsletter['subject'],
'html' => $newsletter['body']['html'],
'text' => $newsletter['body']['text']
'subject' => $newsletter['subject']
);
if(!empty($newsletter['body']['html'])) {
$body['html'] = $newsletter['body']['html'];
}
if(!empty($newsletter['body']['text'])) {
$body['text'] = $newsletter['body']['text'];
}
return $body;
}
function auth() {