summaryrefslogtreecommitdiff
path: root/commands/compose/send.go
diff options
context:
space:
mode:
authorLuke Drummond <luke.drummond@codeplay.com>2019-10-29 17:11:38 +0000
committerDrew DeVault <sir@cmpwn.com>2019-11-01 11:02:01 -0400
commit331b915139e23073aa42bf28d67901383dd859ca (patch)
tree52f339005f16a28c2f19b31f42cbbe21e7ca5273 /commands/compose/send.go
parent6dc537fbe3516181322a93b04f3884b9a4bb243c (diff)
downloadaerc-331b915139e23073aa42bf28d67901383dd859ca.zip
Add support for AUTH LOGIN submission
`go-sasl` upstream added support [1] for the obsolete [2] AUTH LOGIN method which enables aerc to send email via servers which remain common in the wild. Fixes ~sircmpwn/aerc2#263 [1] https://github.com/emersion/go-sasl/commit/61afe53d [2] https://datatracker.ietf.org/doc/draft-murchison-sasl-login/
Diffstat (limited to 'commands/compose/send.go')
-rw-r--r--commands/compose/send.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go
index 5a12428..2d994bf 100644
--- a/commands/compose/send.go
+++ b/commands/compose/send.go
@@ -92,6 +92,9 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
fallthrough
case "none":
saslClient = nil
+ case "login":
+ password, _ := uri.User.Password()
+ saslClient = sasl.NewLoginClient(uri.User.Username(), password)
case "plain":
password, _ := uri.User.Password()
saslClient = sasl.NewPlainClient("", uri.User.Username(), password)