Skip to content

Commit

Permalink
Merge branch 'hotfix/1.5.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhj committed Jul 5, 2019
2 parents 377ca4c + c5a168c commit 55d6cfa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 6 additions & 1 deletion library/NotificationCenter/Gateway/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ public function sendDraft(EmailMessageDraft $objDraft)

// Set reply-to address
if ($strReplyTo = $objDraft->getReplyToEmail()) {
$objEmail->replyTo($strReplyTo);
try {
$objEmail->replyTo($strReplyTo);
} catch (\Exception $e) {
\System::log(sprintf('Could not send email for message ID %s: %s', $objDraft->getMessage()->id, $e->getMessage()), __METHOD__, TL_ERROR);
return false;
}
}

// Set email subject
Expand Down
6 changes: 1 addition & 5 deletions library/NotificationCenter/Util/StringUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ public static function getTokenAttachments($strAttachmentTokens, array $arrToken
}

foreach (trimsplit(',', $strAttachmentTokens) as $strToken) {
if (version_compare(VERSION . '.' . BUILD, '3.5.1', '<')) {
$strParsedToken = \String::parseSimpleTokens($strToken, $arrTokens);
} else {
$strParsedToken = \StringUtil::parseSimpleTokens($strToken, $arrTokens);
}
$strParsedToken = \Haste\Util\StringUtil::recursiveReplaceTokensAndTags($strToken, $arrTokens);

foreach (trimsplit(',', $strParsedToken) as $strFile) {
$strFileFull = TL_ROOT . '/' . $strFile;
Expand Down

0 comments on commit 55d6cfa

Please sign in to comment.