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.
Initially, the backend was meant to cache calls to the GitHub API.
However, I decided to just cache them in the sessionStorage of the
visitor’s browser instead.
Backend as is can query GitHub for the information that will be
necessary later on in the frontend's pages. It does not cache this
information yet though.
Signed-off-by: Lucien Cartier-Tilet <lucien@phundrak.com>