~bigbes/core-go

ref: 6eae2199abdb5aeef125202d9a6854a099d8dd4a core-go/email/send.go -rw-r--r-- 3.9 KiB
78cfc5d8 — Robin Jarry 1 year, 8 months ago
email: allow sending raw emails

The current email.Enqueue() function only allows sending messages with
the server's default settings.

In order to support sending any arbitrary message, we need to expose
a lower level API taking a raw message.Entity pointer. This new API will
be reused in a future reimplementation of the lists.sr.ht ingress agent
to forward messages to subscribers.

Add email.EnqueueRaw() that calls email.SendRaw(). Retry sending 10
times in the case of failure.

Signed-off-by: Robin Jarry <robin@jarry.cc>
bbcb2a10 — Robin Jarry 1 year, 8 months ago
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>
069c77be — Drew DeVault 2 years ago
email: update StartTLS usage per go-smtp changes
f762ad22 — Peter Sanchez 4 years ago
Bugfix, mail config placed in wrong setting.
31e77bac — Peter Sanchez 4 years ago
Add support for mail setups that don't support TLS or Auth
f44afb10 — Simon Ser 4 years ago
go fmt
606ff2ef — Drew DeVault 5 years ago
Sign outgoing emails
9af62068 — Drew DeVault 5 years ago
email: remove leftover debug code
0c651498 — Drew DeVault 5 years ago
Add email work queue