Fix send mail (#13312)
* Fix send mail * Fix send mail * Update modules/private/mail.go Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
parent
dbebc6b0e3
commit
38d11eea58
3 changed files with 36 additions and 6 deletions
|
@ -49,5 +49,10 @@ func SendEmail(subject, message string, to []string) (int, string) {
|
|||
return http.StatusInternalServerError, fmt.Sprintf("Response body error: %v", err.Error())
|
||||
}
|
||||
|
||||
return http.StatusOK, fmt.Sprintf("Was sent %s from %d", body, len(to))
|
||||
var users = fmt.Sprintf("%d", len(to))
|
||||
if len(to) == 0 {
|
||||
users = "all"
|
||||
}
|
||||
|
||||
return http.StatusOK, fmt.Sprintf("Sent %s email(s) to %s users", body, users)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue