From b6b77da7cfcc31ae15e913b74fc3bea4fffb8147 Mon Sep 17 00:00:00 2001 From: Khanbala Rashidov <50279392+KhanbalaRashidov@users.noreply.github.com> Date: Mon, 26 May 2025 16:23:47 +0400 Subject: [PATCH] feat: refactor the code in NewSmtpEmailProvider() (#3832) --- email/smtp.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/email/smtp.go b/email/smtp.go index 4ddfa10e..7cc2756c 100644 --- a/email/smtp.go +++ b/email/smtp.go @@ -27,8 +27,7 @@ type SmtpEmailProvider struct { } func NewSmtpEmailProvider(userName string, password string, host string, port int, typ string, disableSsl bool) *SmtpEmailProvider { - dialer := &gomail.Dialer{} - dialer = gomail.NewDialer(host, port, userName, password) + dialer := gomail.NewDialer(host, port, userName, password) if typ == "SUBMAIL" { dialer.TLSConfig = &tls.Config{InsecureSkipVerify: true} }