SendRegisterNotifyMail triggers a notify e-mail by admin created a account.
(c *macaron.Context, u User)
| 148 | |
| 149 | // SendRegisterNotifyMail triggers a notify e-mail by admin created a account. |
| 150 | func SendRegisterNotifyMail(c *macaron.Context, u User) { |
| 151 | data := map[string]any{ |
| 152 | "Username": u.DisplayName(), |
| 153 | } |
| 154 | body, err := render(tmplAuthRegisterNotify, data) |
| 155 | if err != nil { |
| 156 | log.Error("HTMLString: %v", err) |
| 157 | return |
| 158 | } |
| 159 | |
| 160 | msg := NewMessage([]string{u.Email()}, c.Tr("mail.register_notify"), body) |
| 161 | msg.Info = fmt.Sprintf("UID: %d, registration notify", u.ID()) |
| 162 | |
| 163 | Send(msg) |
| 164 | } |
| 165 | |
| 166 | // SendCollaboratorMail sends mail notification to new collaborator. |
| 167 | func SendCollaboratorMail(u, doer User, repo Repository) { |
no test coverage detected