Skip to content

Commit

Permalink
Allow custom subjects when mailing
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Jan 2, 2016
1 parent 7c41953 commit 7b79dac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,14 @@ protected function addContent($message, $view, $plain, $raw, $data)
$text = $result['text'];
}

if ($subject = array_get($result['settings'], 'subject')) {
/*
* Subject
*/
$customSubject = $message->getSwiftMessage()->getSubject();
if (
empty($customSubject) &&
($subject = array_get($result['settings'], 'subject'))
) {
$message->subject($subject);
}
}
Expand Down

0 comments on commit 7b79dac

Please sign in to comment.