Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Add support for no-auth SMTPs

Kailash Nadh047de697707e
diff --git a/config.toml.sample b/config.toml.sample
index 4d622994..9b29c700 100644
--- a/config.toml.sample
+++ b/config.toml.sample
@@ -79,7 +79,7 @@ max_idle = 10
host = "my.smtp.server"
port = "25"
- # cram or plain.
+ # cram | plain | empty for no auth
auth_protocol = "cram"
username = "xxxxx"
password = ""
diff --git a/messenger/emailer.go b/messenger/emailer.go
index a591c883..80df9c37 100644
--- a/messenger/emailer.go
+++ b/messenger/emailer.go
@@ -43,7 +43,7 @@ func NewEmailer(srv ...Server) (Messenger, error) {
var auth smtp.Auth
if s.AuthProtocol == "cram" {
auth = smtp.CRAMMD5Auth(s.Username, s.Password)
- } else {
+ } else if s.AuthProtocol == "plain" {
auth = smtp.PlainAuth("", s.Username, s.Password, s.Host)
}