fix: remove redundante names
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 44s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 49s

This commit was merged in pull request #299.
This commit is contained in:
2024-12-04 23:22:25 +01:00
parent 2d5f42bb28
commit 5ef59df2d0
16 changed files with 228 additions and 230 deletions

View File

@@ -8,25 +8,25 @@ import (
"net/smtp"
)
type MailService interface {
type Mail interface {
// Sending an email is a fire and forget operation. Thus no error handling
SendMail(to string, subject string, message string)
}
type MailServiceImpl struct {
serverSettings *types.ServerSettings
type MailImpl struct {
server *types.Settings
}
func NewMailServiceImpl(serverSettings *types.ServerSettings) MailServiceImpl {
return MailServiceImpl{serverSettings: serverSettings}
func NewMailImpl(server *types.Settings) MailImpl {
return MailImpl{server: server}
}
func (m MailServiceImpl) SendMail(to string, subject string, message string) {
if m.serverSettings.Smtp == nil {
func (m MailImpl) SendMail(to string, subject string, message string) {
if m.server.Smtp == nil {
return
}
s := m.serverSettings.Smtp
s := m.server.Smtp
auth := smtp.PlainAuth("", s.User, s.Pass, s.Host)