feat: send confirmation email to sender

When users submit a contact form, they now receive a confirmation
email acknowlledging receipt of their message. The backend also
continues to send a notification email to the configured recipient.

If the backend fails to send the acknowledgement email to the sender,
it will assume the email is not valid and will therefore not transmit
the contact request to the configured recipient.

Changes:
- Refactor `send_email()` to `send_emails()` that sends two emails:
  - Confirmation email from the submitter
  - Notification email to the configured recipient
- Add `From<T>` implementations of various errors for new error type
  `ContactError`.
- Errors now return a translation identifier for the frontend.
This commit is contained in:
2025-11-15 14:08:37 +01:00
parent 71c4cf1061
commit 1e769f0b39
9 changed files with 350 additions and 77 deletions

View File

@@ -11,6 +11,8 @@
#![warn(missing_docs)]
#![allow(clippy::unused_async)]
/// Custom errors
pub mod errors;
/// Custom middleware implementations
pub mod middleware;
/// API route handlers and endpoints