Reorganize cmd init functions
This commit is contained in:
parent
d9d00ba60c
commit
f5e44d9eb3
4 changed files with 22 additions and 7 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Reference in a new issue