Email alerts not sent
There is a check to verify that emails are sent for drug and medical device alerts and travel advice updates. These checks are run via Jenkins: Drug and medical device alerts check and Travel advice alerts check.
If a check fails:
- You can inspect the console logs for the Jenkins job to confirm the reason for the failure.
- You can check the mailbox that is used for the check to rule out an issue
searching for the message. We have an email address
firstname.lastname@example.org is subscribed to travel advice alerts and drug and medical device alerts. The credentials for this account is in the 2nd line password store under
- You can check whether the email was sent to the courtesy copies google group - presence here doesn’t mean that the email was sent to users, just that Email Alert API processed the content change.
- You can investigate further whether the email was sent by accessing the
Email Alert API console.
ContentChange.where(content_id: "<items-content-id>")to look up the content changes Email Alert API has received for a particular content-id
- Given a particular content change you can monitor whether this should have
been sent to people by querying
SubscriptionContent.where(content_change: <your_content_change>)to look up the email data directly
- You can look up emails sending or sent to a particular address with
- You can find unprocessed content changes and check whether the content change for the failed alert is in the list of affected content changes
- If you find the content change has not been processed, check the number of subscription contents built for the content change a few times (the number should increase)
- If the number of subscription contents is not increasing, it is possible the sidekiq job has terminated ungracefully. You can resend the content change. This will ignore any that have already gone out so it is safe to execute
Resending travel advice emails
If you need to force the sending of a travel advice email alert, there
is a rake task in Travel Advice Publisher, which you can run using
this Jenkins job where the edition ID of the
travel advice content item can be found in the URL of the country’s edit
page in Travel Advice Publisher and looks like