gomailer/cmd/sendmail.go

29 lines
618 B
Go
Raw Normal View History

2023-04-06 23:09:43 +00:00
package cmd
import (
2023-04-08 00:31:59 +00:00
"git.dafu.dev/dafu/gomailer/pkg"
2023-04-06 23:09:43 +00:00
"github.com/spf13/cobra"
)
// sendmailCmd represents the sendmail command
var sendmailCmd = &cobra.Command{
Use: "sendmail",
Short: "Send mail with the configured server",
Long: `Send Emails for testing Mail templates:
sendmail.`,
Run: func(cmd *cobra.Command, args []string) {
2023-04-08 00:31:59 +00:00
gomailer.SendMail(Cfg.mailsettings, Cfg.mailserver)
2023-04-06 23:09:43 +00:00
},
}
func init() {
rootCmd.AddCommand(sendmailCmd)
2023-04-08 00:31:59 +00:00
// sendmailCmd.Flags().BoolVar(&help, "test", false, "Help message for sendmail")
// sendmailCmd.Flags().BoolVarP(&inline, "inline", "i", false, "Inline css")
2023-04-06 23:09:43 +00:00
}