Skip to content

Commit

Permalink
Improved log messages of failed sendouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Croker committed May 13, 2020
1 parent c2a274d commit 846c024
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Release Notes for Campaign

## 1.15.4 - Unreleased
### Changed
- Improved log messages of failed sendouts.

## 1.15.3 - 2020-05-12
### Fixed
- Fixed a bug in the Amazon SES webhook for bounce and complaint notifications ([#103](https://github.com/putyourlightson/craft-campaign/issues/103)).
Expand Down
6 changes: 5 additions & 1 deletion src/services/SendoutsService.php
Expand Up @@ -457,7 +457,11 @@ public function sendEmail(SendoutElement $sendout, ContactElement $contact, int

$this->_updateSendoutRecord($sendout, ['fails', 'sendStatus']);

Campaign::$plugin->log('Sending of the sendout "{title}" failed after {sendAttempts} send attempt(s). Please check that your Campaign email settings are correctly configured and check the error in the Craft log.', ['title' => $sendout->title, 'sendAttempts' => Campaign::$plugin->getSettings()->maxSendAttempts]);
Campaign::$plugin->log('Sending of the sendout "{title}" to {email} failed after {sendAttempts} send attempt(s). Please check that your Campaign email settings are correctly configured and check the error in the Craft log.', [
'title' => $sendout->title,
'email' => $contact->email,
'sendAttempts' => Campaign::$plugin->getSettings()->maxSendAttempts,
]);
}

// Fire an after event
Expand Down

0 comments on commit 846c024

Please sign in to comment.