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:
2
smtp.go
2
smtp.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user