(issue Issue, repo Repository, doer User, tplName string, tos []string, info string)
| 193 | } |
| 194 | |
| 195 | func composeIssueMessage(issue Issue, repo Repository, doer User, tplName string, tos []string, info string) *Message { |
| 196 | subject := issue.MailSubject() |
| 197 | body := string(markup.Markdown([]byte(issue.Content()), repo.HTMLURL(), repo.ComposeMetas())) |
| 198 | data := composeTplData(subject, body, issue.HTMLURL()) |
| 199 | data["Doer"] = doer |
| 200 | content, err := render(tplName, data) |
| 201 | if err != nil { |
| 202 | log.Error("HTMLString (%s): %v", tplName, err) |
| 203 | } |
| 204 | from := gomail.NewMessage().FormatAddress(conf.Email.FromEmail, doer.DisplayName()) |
| 205 | msg := NewMessageFrom(tos, from, subject, content) |
| 206 | msg.Info = fmt.Sprintf("Subject: %s, %s", subject, info) |
| 207 | return msg |
| 208 | } |
| 209 | |
| 210 | // SendIssueCommentMail composes and sends issue comment emails to target receivers. |
| 211 | func SendIssueCommentMail(issue Issue, repo Repository, doer User, tos []string) { |
no test coverage detected