mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
update deps
adapt smtp configuration to changes in upstream library Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -279,15 +279,15 @@ func (c *Config) Initialize(configDir string, isService bool) error {
|
||||
}
|
||||
|
||||
func (c *Config) getMailClientOptions() []mail.Option {
|
||||
options := []mail.Option{mail.WithoutNoop()}
|
||||
options := []mail.Option{mail.WithPort(c.Port), mail.WithoutNoop()}
|
||||
|
||||
switch c.Encryption {
|
||||
case 1:
|
||||
options = append(options, mail.WithSSLPort(false))
|
||||
options = append(options, mail.WithSSL())
|
||||
case 2:
|
||||
options = append(options, mail.WithTLSPortPolicy(mail.TLSMandatory))
|
||||
options = append(options, mail.WithTLSPolicy(mail.TLSMandatory))
|
||||
default:
|
||||
options = append(options, mail.WithTLSPortPolicy(mail.NoTLS))
|
||||
options = append(options, mail.WithTLSPolicy(mail.NoTLS))
|
||||
}
|
||||
if c.User != "" {
|
||||
options = append(options, mail.WithUsername(c.User))
|
||||
@@ -317,7 +317,6 @@ func (c *Config) getMailClientOptions() []mail.Option {
|
||||
}),
|
||||
mail.WithDebugLog())
|
||||
}
|
||||
options = append(options, mail.WithPort(c.Port))
|
||||
return options
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user