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)
| 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. |
| 230 | func 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 | } |
no outgoing calls
no test coverage detected