silverstripe-contentreview
silverstripe-contentreview copied to clipboard
Notification job marked as 'Broken' with invalid email
Overview
The Content Review Notification job will be marked as 'Broken' in the Jobs admin panel if one of the expected recipients has an invalid email address.
Error output message
[2020-07-21 14:24:20][INFO] Job caused exception Address in mailbox given [test.email.email] does not comply with RFC 2822, 3.6.2. in /sites/cmstest/releases/20200707013338/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php at line 345 [2020-07-21 14:24:20][ERROR] Address in mailbox given [test.email.email] does not comply with RFC 2822, 3.6.2. [2020-07-21 14:24:20][INFO] [2020-07-21 14:24:20][INFO] Job paused at 2020-07-21 14:24:20
To recreate
- Create a user with an invalid email address
- Create a user with a valid email address
- Assign both users as a content reviewer in the site settings of a page
- Set the page's 'next review date' to yesterday
- run the Content Review Notification job
- confirm email has been received to the valid email address
- Visit Jobs admin panel to confirm successful run of the job Expected: I should see the job marked as 'Complete' Actual result: The job is marked as 'Broken' while emails have been successfully sent to valid emails
Acceptance criteria
- [ ] All users with valid emails receives notifications even if some users don't have valid email addresses
- [ ] A warning is log to the job, but the job is not broken.
- [ ] Create a separate card for identifying what to do when the CMS tries to send an email to someone without a valid email address.
I originally raised this as it appeared no emails would be sent if one recipient contained an invalid email address, however that's not true.
This isn't really incorrect behaviour, but it's not helpful to users as it doesn't bubble up anywhere useful. The simplest improvement here would probably be to add validation to the field for entering the email address.
Bumping this to high because the "ERROR" means that it's causing the entire job to stop, so other any other pages with valid addresses are not having emails sent
Related to https://github.com/silverstripe/silverstripe-contentreview/issues/188
@sabina-talipova have you made the follow-up card mentioned in the acceptance criteria?
@GuySartorelli , I've created this issue, but it's probably more general problem. Do you think we need another ticket with more narrow description?
identifying what to do when the CMS tries to send an email to someone without a valid email address.
This sounds to me like a different problem than the issue you have currently created which sounds more like
decide what validation is required for
Member
, and implement that validation
(in other words yes please I think a new issue about how to handle the email scenario specifically is warranted)
Merged