aboutsummaryrefslogtreecommitdiffstats
path: root/services/mailer/mail.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-08-08 20:04:28 +0200
committerGitHub <noreply@github.com>2022-08-08 20:04:28 +0200
commit2b101994a6f4724500908226f9a55816062f1da6 (patch)
treec13f682c0a3be130a5ee29a919ef292c41efee95 /services/mailer/mail.go
parentccf03e19c275057cf9b9c86f3ecfbc1fd60008f5 (diff)
downloadgitea-2b101994a6f4724500908226f9a55816062f1da6.tar.gz
gitea-2b101994a6f4724500908226f9a55816062f1da6.zip
Fix init mail render logic (#20704)
This bug affects tests which are sending emails (#20307). Some tests reinitialise the web routes (like `TestNodeinfo`) which messed up the mail templates. There is no reason why the templates should be loaded in the routes method.
Diffstat (limited to 'services/mailer/mail.go')
-rw-r--r--services/mailer/mail.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/services/mailer/mail.go b/services/mailer/mail.go
index b8d79bd818..738a207ce8 100644
--- a/services/mailer/mail.go
+++ b/services/mailer/mail.go
@@ -55,12 +55,6 @@ var (
subjectRemoveSpaces = regexp.MustCompile(`[\s]+`)
)
-// InitMailRender initializes the mail renderer
-func InitMailRender(subjectTpl *texttmpl.Template, bodyTpl *template.Template) {
- subjectTemplates = subjectTpl
- bodyTemplates = bodyTpl
-}
-
// SendTestMail sends a test mail
func SendTestMail(email string) error {
if setting.MailService == nil {