1
0

Reorganize cmd init functions

This commit is contained in:
kolaente
2020-06-13 19:44:45 +02:00
parent d9d00ba60c
commit f5e44d9eb3
4 changed files with 22 additions and 7 deletions

View File

@ -30,6 +30,12 @@ var testmailCmd = &cobra.Command{
Use: "testmail [email]",
Short: "Send a test mail using the configured smtp connection",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
lightInit()
// Start the mail daemon
mail.StartMailDaemon()
},
Run: func(cmd *cobra.Command, args []string) {
log.Info("Sending testmail...")
email := args[0]