bbcb2a10
email: keep smtp client connection alive
Instead of connecting and disconnecting each and every time we need to send an email, keep the SMTP connection alive attached to a context variable. Before sending an email, check if the connection is still valid and reconnect if it is not. Signed-off-by: Robin Jarry <robin@jarry.cc>
Robin Jarry <robin@jarry.cc> — 2024-12-14 22:53:54 UTC
Commit bbcb2a1096d86b989e5d82dc45289daec38ba4a6 —
view raw patch
Parent(s):
7457c44b
| File | Status | + | − |
|---|---|---|---|
email/send.go
|
M | +18 | -5 |
email/worker.go
|
M | +11 | -4 |