Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outgoing email logging improvements #4895

Closed
3 tasks done
sergei-maertens opened this issue Dec 9, 2024 · 2 comments · Fixed by #4905
Closed
3 tasks done

Outgoing email logging improvements #4895

sergei-maertens opened this issue Dec 9, 2024 · 2 comments · Fixed by #4905
Assignees
Milestone

Comments

@sergei-maertens
Copy link
Member

sergei-maertens commented Dec 9, 2024

We support sending custom email headers in all emails sent by Open Forms. Currently, this is only used for registration emails. See

X_OF_CONTENT_TYPE_HEADER = "X-OF-Content-Type"

While debugging a production environment to figure out what type of emails were sent, I had to search on the content of the email which is fragile because different forms can use completely different templates rather than a single global configuration. This would've been easier if the registration emails would have been properly tagged with the custom headers so I could filter on this header instead (I was able to exclude registration emails this way).

Additionally, there's a typo in the content type for the Submission model - the app label is singular instead of plural.

Tasks

  • Ensure that custom email headers are used for confirmation emails
  • Ensure that custom email headers are used for cosign request emails
  • Fix content type for submissions in email constants
@viktorvanwijk
Copy link
Contributor

Currently, this is only used for registration emails

and

This would've been easier if the registration emails would have been properly tagged with the custom headers

seem to be contradicting each other. In the code I can find usages of EmailContentTypeChoices.registration, but NOT EmailContentTypeChoices.confirmation and EmailContentTypeChoices.cosign_confirmation. Shouldn't 'registration' be 'confirmation' in the task list, or am I not understanding it correctly?

@viktorvanwijk viktorvanwijk moved this from Todo to In Progress in Development Dec 11, 2024
@sergei-maertens
Copy link
Member Author

registration emails are tagged, confirmation emails are not but should be, sorry for the confusion!

viktorvanwijk added a commit that referenced this issue Dec 12, 2024
It is rather a cosign request email, since the cosign confirmation itself is not much different from the "normal" confirmation email.
viktorvanwijk added a commit that referenced this issue Dec 12, 2024
This test is not exclusive to appointments, so it makes more sense to have it in the submission app
viktorvanwijk added a commit that referenced this issue Dec 12, 2024
It is rather a cosign request email, since the cosign confirmation itself is not much different from the "normal" confirmation email.
sergei-maertens added a commit that referenced this issue Dec 12, 2024
…ail-logging-improvements

[#4895] outgoing email logging improvements
@github-project-automation github-project-automation bot moved this from In Progress to Done in Development Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants