Sends emails to users that subscribe to specific GOV.UK email alerts.
Provides a consistent internal interface to external email notification services. Currently supports only GOV.UK Notify.
Given a tagged publication event, it sends email alerts for subscribers to those tags via the external services.
- A publication event that creates or changes a content item
- The representation of that event for the purpose of sending emails
- An attempt to send a generated email to a subscriber using the external email notification services
- Can be multiple attempts per email if there are errors
- One batch of either daily or weekly digests representing a particular subscription that has a start and end time and a set of subscribers to send emails to
- An email generated from one or more content changes with a subject line and body, to be sent to subscribers
Matched content change:
- A content change that has been matched to a set of subscribers who will receive an email about it
- A set of criteria that users can subscribe to in order to receive emails (eg. all publications by HMRC)
- A user who has subscribed to one or more subscriber lists
- The relationship between a subscriber and the subscription lists they are subscribed to
- PostgreSQL database (9.3 or higher - requires
- Redis (for Sidekiq)
- GOV.UK Notify API key and other details (see
email_service.ymlfor required fields)
- Check that the configuration in
bundle exec rake db:setupto load the database
Running the application
- email-alert-api runs on port 3088
- sidekiq-monitoring for email-alert-api uses 3089
Running the test suite
RAILS_ENV=test bundle exec rake db:setupto load the database
bundle exec rspecto run the tests
Using test email addresses for signup
Using any email address that ends with
will not create a subscriber or a subscription, however will return a
201 Created response.