feat: update SendgridEmailProvider to support dynamic host/path, add From name field (#3576)

* feat: add fields into UI FromName, Host, Endpoint

* feat: update SendgridEmailProvider support dynamic host/path client init, code convention
This commit is contained in:
Bui Le Anh Nguyen
2025-02-12 23:51:31 +07:00
committed by GitHub
parent e926a07c58
commit 37d93a5eea
3 changed files with 46 additions and 29 deletions

View File

@ -24,7 +24,7 @@ func GetEmailProvider(typ string, clientId string, clientSecret string, host str
} else if typ == "Custom HTTP Email" {
return NewHttpEmailProvider(endpoint, method)
} else if typ == "SendGrid" {
return NewSendgridEmailProvider(clientSecret)
return NewSendgridEmailProvider(clientSecret, host, endpoint)
} else {
return NewSmtpEmailProvider(clientId, clientSecret, host, port, typ, disableSsl)
}