aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mailer.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mailer.go')
-rw-r--r--cmd/mailer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/mailer.go b/cmd/mailer.go
index ee11b56cc7..1a4b0902e2 100644
--- a/cmd/mailer.go
+++ b/cmd/mailer.go
@@ -14,6 +14,9 @@ import (
)
func runSendMail(c *cli.Context) error {
+ ctx, cancel := installSignals()
+ defer cancel()
+
setting.NewContext()
if err := argsSet(c, "title"); err != nil {
@@ -39,7 +42,7 @@ func runSendMail(c *cli.Context) error {
}
}
- status, message := private.SendEmail(subject, body, nil)
+ status, message := private.SendEmail(ctx, subject, body, nil)
if status != http.StatusOK {
fmt.Printf("error: %s\n", message)
return nil