diff --git a/.clabot b/.clabot index d825657..af662cc 100644 --- a/.clabot +++ b/.clabot @@ -1,4 +1,4 @@ { - "contributors": ["azukaar", "jwr1", "Jogai"], + "contributors": ["azukaar", "jwr1", "Jogai", "InterN0te"], "message": "We require contributors to sign our [Contributor License Agreement](https://github.com/azukaar/Cosmos-Server/blob/master/cla.md). In order for us to review and merge your code, add yourself to the .clabot file as contributor, as a way of signing the CLA." } diff --git a/client/src/pages/config/users/configman.jsx b/client/src/pages/config/users/configman.jsx index 70fd416..bbe03dc 100644 --- a/client/src/pages/config/users/configman.jsx +++ b/client/src/pages/config/users/configman.jsx @@ -115,6 +115,7 @@ const ConfigManagement = () => { Email_Password: config.EmailConfig.Password, Email_From: config.EmailConfig.From, Email_UseTLS : config.EmailConfig.UseTLS, + Email_AllowInsecureTLS : config.EmailConfig.AllowInsecureTLS, SkipPruneNetwork: config.DockerConfig.SkipPruneNetwork, DefaultDataPath: config.DockerConfig.DefaultDataPath || "/usr", @@ -169,6 +170,7 @@ const ConfigManagement = () => { Password: values.Email_Password, From: values.Email_From, UseTLS: values.Email_UseTLS, + AllowInsecureTLS: values.Email_AllowInsecureTLS, }, DockerConfig: { ...config.DockerConfig, @@ -519,6 +521,15 @@ const ConfigManagement = () => { formik={formik} helperText="SMTP Uses TLS" /> + + {formik.values.Email_UseTLS && ( + + )} )} diff --git a/src/utils/emails.go b/src/utils/emails.go index f1a1eee..9000eff 100644 --- a/src/utils/emails.go +++ b/src/utils/emails.go @@ -88,7 +88,7 @@ func SendEmail(recipients []string, subject string, body string) error { auth := smtp.PlainAuth("", config.EmailConfig.Username, config.EmailConfig.Password, config.EmailConfig.Host) tlsConfig := &tls.Config{ - InsecureSkipVerify: false, + InsecureSkipVerify: config.EmailConfig.AllowInsecureTLS, ServerName: config.EmailConfig.Host, } diff --git a/src/utils/types.go b/src/utils/types.go index cd586c9..3c985a8 100644 --- a/src/utils/types.go +++ b/src/utils/types.go @@ -198,6 +198,7 @@ type EmailConfig struct { Password string From string UseTLS bool + AllowInsecureTLS bool } type OpenIDClient struct {