Ghost/ghost/email-service/lib
Simon Backx 819d0d884c
Improved email verification required checks (#16060)
fixes https://github.com/TryGhost/Team/issues/2366
refs https://ghost.slack.com/archives/C02G9E68C/p1670232405014209

Probem described in issue.

In the old MEGA flow:
- The `email_verification_required` check is now repeated inside the job

In the new email service flow:
- The `email_verification_required` is now checked (didn't happen
before)
- When generating the email batch recipients, we only include members
that were created before the email was created. That way it is
impossible to avoid limit checks by inserting new members between
creating an email and sending an email.
- We don't need to repeat the check inside the job because of the above
changes

Improved handling of large imports:
- When checking `email_verification_required`, we now also check if the
import threshold is reached (a new method is introduced in
vertificationTrigger specifically for this usage). If it is, we start
the verification progress. This is required for long running imports
that only check the verification threshold at the very end.
- This change increases the concurrency of fastq to 3 (refs
https://ghost.slack.com/archives/C02G9E68C/p1670232405014209). So when
running a long import, it is now possible to send emails without having
to wait for the import. Above change makes sure it is not possible to
get around the verification limits.

Refactoring:
- Removed the need to use `updateVerificationTrigger` by making
thresholds getters instead of fixed variables.
- Improved awaiting of members import job in regression test
2023-01-04 11:22:12 +01:00
..
email-templates 🐛 Removed horizontal scroll for long author's name (#15985) 2022-12-12 15:36:58 +04:00
batch-sending-service.js Improved email verification required checks (#16060) 2023-01-04 11:22:12 +01:00
email-controller.js Implemented email previews and tests using new email flow (#15899) 2022-11-30 13:56:28 +01:00
email-event-processor.js 🐛 Handled unknown Mailgun events (#15995) 2022-12-14 11:17:45 +01:00
email-event-storage.js 🐛 Fixed setting delivered_at to null after hard bounce (#15942) 2022-12-06 10:26:54 +05:30
email-renderer.js Fixed email preview text with new stability flow (#15996) 2022-12-14 15:54:26 +05:30
email-segmenter.js Updated unit test coverage for email service (#15913) 2022-12-02 00:33:28 +05:30
email-service.js Improved email verification required checks (#16060) 2023-01-04 11:22:12 +01:00
mailgun-email-provider.js Added E2E tests for batch sending (#15910) 2022-12-01 13:43:49 +01:00
sending-service.js Added E2E tests for batch sending (#15910) 2022-12-01 13:43:49 +01:00