@@ -61,7 +61,7 @@ func SendTestMail(email string) error {
61
61
// No mail service configured
62
62
return nil
63
63
}
64
- return gomail .Send (Sender , NewMessage ([] string { email } , "Gitea Test Email!" , "Gitea Test Email!" ).ToMessage ())
64
+ return gomail .Send (Sender , NewMessage (email , "Gitea Test Email!" , "Gitea Test Email!" ).ToMessage ())
65
65
}
66
66
67
67
// sendUserMail sends a mail to the user
@@ -86,7 +86,7 @@ func sendUserMail(language string, u *user_model.User, tpl base.TplName, code, s
86
86
return
87
87
}
88
88
89
- msg := NewMessage ([] string { u .Email } , subject , content .String ())
89
+ msg := NewMessage (u .Email , subject , content .String ())
90
90
msg .Info = fmt .Sprintf ("UID: %d, %s" , u .ID , info )
91
91
92
92
SendAsync (msg )
@@ -137,7 +137,7 @@ func SendActivateEmailMail(u *user_model.User, email *user_model.EmailAddress) {
137
137
return
138
138
}
139
139
140
- msg := NewMessage ([] string { email .Email } , locale .Tr ("mail.activate_email" ), content .String ())
140
+ msg := NewMessage (email .Email , locale .Tr ("mail.activate_email" ), content .String ())
141
141
msg .Info = fmt .Sprintf ("UID: %d, activate email" , u .ID )
142
142
143
143
SendAsync (msg )
@@ -168,7 +168,7 @@ func SendRegisterNotifyMail(u *user_model.User) {
168
168
return
169
169
}
170
170
171
- msg := NewMessage ([] string { u .Email } , locale .Tr ("mail.register_notify" ), content .String ())
171
+ msg := NewMessage (u .Email , locale .Tr ("mail.register_notify" ), content .String ())
172
172
msg .Info = fmt .Sprintf ("UID: %d, registration notify" , u .ID )
173
173
174
174
SendAsync (msg )
@@ -202,7 +202,7 @@ func SendCollaboratorMail(u, doer *user_model.User, repo *repo_model.Repository)
202
202
return
203
203
}
204
204
205
- msg := NewMessage ([] string { u .Email } , subject , content .String ())
205
+ msg := NewMessage (u .Email , subject , content .String ())
206
206
msg .Info = fmt .Sprintf ("UID: %d, add collaborator" , u .ID )
207
207
208
208
SendAsync (msg )
@@ -322,7 +322,7 @@ func composeIssueCommentMessages(ctx *mailCommentContext, lang string, recipient
322
322
323
323
msgs := make ([]* Message , 0 , len (recipients ))
324
324
for _ , recipient := range recipients {
325
- msg := NewMessageFrom ([] string { recipient .Email } , ctx .Doer .DisplayName (), setting .MailService .FromEmail , subject , mailBody .String ())
325
+ msg := NewMessageFrom (recipient .Email , ctx .Doer .DisplayName (), setting .MailService .FromEmail , subject , mailBody .String ())
326
326
msg .Info = fmt .Sprintf ("Subject: %s, %s" , subject , info )
327
327
328
328
msg .SetHeader ("Message-ID" , msgID )
0 commit comments