~bigbes/core-go

ref: e559510fc24476518e3c39b4ece21335d2facd79 core-go/server/email.go -rw-r--r-- 2.2 KiB
86ad9b5a — Conrad Hoffmann 2 years ago
server/email: use go-message for address parsing

No need to additionally depend on net/mail
a941162e — Simon Ser 3 years ago
server/email: don't panic in EmailRecover

A panic in here is not great, because this function is supposed to
be the panic handler. Let's just log the error instead.
1fd2476d — Simon Ser 3 years ago
server/email: log missing mail::error-to, treat empty string as unset

Log a message when mail::error-to is unset, just in case the admin
forgot to set it. Don't try to parse an email address if error-to
is set to the empty string (the default value in the default config
file).
2f239415 — Simon Ser 3 years ago
server/email: simplify and cleanup

- Only print the error once
- Remove unnecessary var
- Use debug.Stack instead of hand-rolled logic
- Ignore json.Marshal errors in a simpler way
e28d47cf — Adnan Maolood 4 years ago
go fmt
9f634ce0 — Drew DeVault 4 years ago
server/email: handle errors out of GQL context
d74ae98e — Drew DeVault 4 years ago
server/email: include variables
f44afb10 — Simon Ser 4 years ago
go fmt
48250772 — Simon Ser 4 years ago
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).
1371ba4b — Drew DeVault 4 years ago
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.
606ff2ef — Drew DeVault 5 years ago
Sign outgoing emails
e72ffa65 — Drew DeVault 5 years ago
server: incorporate queue management
0c651498 — Drew DeVault 5 years ago
Add email work queue
1d2a30cb — Drew DeVault 5 years ago
Import GQL server interfaces from gql.sr.ht