PIMS-2313 BUG: Emails Sent to System User #2958
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Summary
PIMS-2313
The system user was being used to send emails in cases where there wasn't an obvious user triggering the email. This was a problem when any of these conditions were met:
Any of these could cause the system user's email to potentially be included in the TO, CC, or BCC fields. Because the system user's email isn't a real email, actually using it in a sent email caused the email to bounce back, which notified the PO.
Changes
Testing
Make sure CHES_SEND_TO_LIVE is not "true" for testing.
Make sure CHES_OVERRIDE_TO is set to your email.
The two cases where the system user was sent an email was when reporting failed resends or when requeuing notifications after an agency email is changed. It's easier to trigger that second one by having an agency with Pending notifications and changing its email address.
This should re-trigger those emails, but it shouldn't add the system user (or any user other than your override setting).
🔰 Checklist