diff --git a/server/email/email.go b/server/email/email.go index 5b273f0..e598fcd 100644 --- a/server/email/email.go +++ b/server/email/email.go @@ -9,16 +9,7 @@ import ( gomail "gopkg.in/mail.v2" ) -type Sender struct { - User string - Password string -} - -func NewSender() Sender { - return Sender{User: constants.SMTP_USERNAME, Password: constants.SMTP_PASSWORD} -} - -func (sender Sender) SendMail(to []string, Subject, bodyMessage string) error { +func SendMail(to []string, Subject, bodyMessage string) error { m := gomail.NewMessage() m.SetHeader("From", constants.SENDER_EMAIL) m.SetHeader("To", to...) diff --git a/server/utils/email.go b/server/utils/email.go index 8b77f98..1a4028a 100644 --- a/server/utils/email.go +++ b/server/utils/email.go @@ -11,8 +11,6 @@ import ( // SendVerificationMail to send verification email func SendVerificationMail(toEmail, token string) error { - sender := email.NewSender() - // The receiver needs to be in slice as the receive supports multiple receiver Receiver := []string{toEmail} @@ -74,7 +72,7 @@ func SendVerificationMail(toEmail, token string) error {
Hey there 👋
-We received a request to sign-up / login for {{.OrgName}}. If this is correct, please confirm your email address by clicking the button below.
We have received request to verify email for {{.OrgName}}. If this is correct, please confirm your email address by clicking the button below.
Hey there 👋
-We received a request to reset password for email: {{.ToEmail}}. If this is correct, please reset the password clicking the button below.
We have received a request to reset password for email: {{.ToEmail}}. If this is correct, please reset the password clicking the button below.