@@ -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 = ""
@@ -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)
}