email: handle failure to encrypt notifications
Currently, failure to encrypt the notification email - e.g. due to an
expired key - will make the entire request fail. Instead, fall back to
sending an unencrypted email and let the request succeed (unless that
fails also, which is unlikely).
Replace x/crypto package by ProtonMail/go-crypto to support ed25519 OpenPGP keys
Remove %e formatting verbs
%e is not valid for formatting error values:
> %e scientific notation, e.g. -1.234456e+78
Instead, use %w when using fmt.Errorf (for error wrapping) and
%v when using log.Printf (%w is not valid in that context).
Configure server to manage mail queue
This also sets up the recovery function for webhooks, so we get emailed
when we panic during a webhook query.
Make worker logs less loud
Expand context for work queues