1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-26 12:18:36 +00:00

Split mail sender sub package from mailer service package (#32618)

Move all mail sender related codes into a sub package of
services/mailer. Just move, no code change.
Then we just have dependencies on go-mail package in the new sub
package. We can use other package to replace it because it's
unmaintainable. ref #18664
This commit is contained in:
Lunny Xiao
2024-11-29 17:15:41 -08:00
committed by GitHub
parent fd3aa5bedb
commit 79d593a9be
15 changed files with 503 additions and 405 deletions

View File

@@ -15,6 +15,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/translation"
sender_service "code.gitea.io/gitea/services/mailer/sender"
)
const (
@@ -67,7 +68,7 @@ func MailTeamInvite(ctx context.Context, inviter *user_model.User, team *org_mod
return err
}
msg := NewMessage(invite.Email, subject, mailBody.String())
msg := sender_service.NewMessage(invite.Email, subject, mailBody.String())
msg.Info = subject
SendAsync(msg)