Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "send-vault", Short: "Send mail (with credentials from vault)", Aliases: []string{"send-v", "s-v", "sv"}, Args: cobra.NoArgs, Run: func(c *cobra.Command, args []string) { var err error host, port, user, password, err := vault_smtp.GetSMTPSecrets(FlagVaultKey) if err != nil { log.Fatal(err) } message := FlagMessage if message == "-" { message = stdin_utils.ReadAll() } from := user if FlagFrom != "" { from = FlagFrom } err = mail_utils.SendSimpleMail( host, strconv.Itoa(port), user, password, from, FlagTo, FlagSubject, message, ) if err != nil { log.Fatal(err) } }, }
View Source
var FlagFrom string
View Source
var FlagMessage string
View Source
var FlagSubject string
View Source
var FlagTo string
View Source
var FlagVaultKey string
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.