2
0
forked from drew/smtprelay

throw an error if the remote is configured for starttls and the server does not have the extension

This commit is contained in:
Mark Gardner
2022-04-21 11:29:15 -05:00
parent b7f3701502
commit 32d0206af0

View File

@@ -374,6 +374,8 @@ func SendMail(r *Remote, from string, to []string, msg []byte) error {
if err = c.StartTLS(config); err != nil {
return err
}
} else if r.Scheme == "starttls" {
return errors.New("starttls: server does not support extension, check remote scheme")
}
}
if r.Auth != nil && c.ext != nil {