MCPcopy Create free account
hub / github.com/gogs/gogs / Send

Function Send

internal/email/message.go:230–245  ·  view source on GitHub ↗

Send puts new message object into mail queue. It returns without confirmation (mail processed asynchronously) in normal cases, but waits/blocks under hook mode to make sure mail has been sent.

(msg *Message)

Source from the content-addressed store, hash-verified

228// It returns without confirmation (mail processed asynchronously) in normal cases,
229// but waits/blocks under hook mode to make sure mail has been sent.
230func Send(msg *Message) {
231 if !conf.Email.Enabled {
232 return
233 }
234
235 mailQueue <- msg
236
237 if conf.HookMode {
238 <-msg.confirmChan
239 return
240 }
241
242 go func() {
243 <-msg.confirmChan
244 }()
245}

Callers 6

SendUserMailFunction · 0.85
SendActivateEmailMailFunction · 0.85
SendRegisterNotifyMailFunction · 0.85
SendCollaboratorMailFunction · 0.85
SendIssueCommentMailFunction · 0.85
SendIssueMentionMailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected