mirror of
https://github.com/axllent/mailpit.git
synced 2025-06-23 00:29:15 +02:00
Fix: Add single dash arguments support to sendmail command (#123)
mailpit sendmail -t was not working because of the single dash argument parsing. This commit fixes it. Co-authored-by: Ronaldo Richieri <ronaldo@bestpractical.com>
This commit is contained in:
@ -30,7 +30,7 @@ func init() {
|
|||||||
sendmailCmd.Flags().BoolVarP(&sendmail.UseB, "long-b", "b", false, "Handle SMTP commands on standard input (use as -bs)")
|
sendmailCmd.Flags().BoolVarP(&sendmail.UseB, "long-b", "b", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||||
sendmailCmd.Flags().BoolVarP(&sendmail.UseS, "long-s", "s", false, "Handle SMTP commands on standard input (use as -bs)")
|
sendmailCmd.Flags().BoolVarP(&sendmail.UseS, "long-s", "s", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||||
sendmailCmd.Flags().BoolP("verbose", "v", false, "Verbose mode (sends debug output to stderr)")
|
sendmailCmd.Flags().BoolP("verbose", "v", false, "Verbose mode (sends debug output to stderr)")
|
||||||
sendmailCmd.Flags().Bool("i", false, "Ignored")
|
sendmailCmd.Flags().BoolP("i", "i", false, "Ignored")
|
||||||
sendmailCmd.Flags().Bool("o", false, "Ignored")
|
sendmailCmd.Flags().BoolP("o", "o", false, "Ignored")
|
||||||
sendmailCmd.Flags().Bool("t", false, "Ignored")
|
sendmailCmd.Flags().BoolP("t", "t", false, "Ignored")
|
||||||
}
|
}
|
||||||
|
@ -75,9 +75,9 @@ func Run() {
|
|||||||
flag.BoolVarP(&UseB, "long-b", "b", false, "Handle SMTP commands on standard input (use as -bs)")
|
flag.BoolVarP(&UseB, "long-b", "b", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||||
flag.BoolVarP(&UseS, "long-s", "s", false, "Handle SMTP commands on standard input (use as -bs)")
|
flag.BoolVarP(&UseS, "long-s", "s", false, "Handle SMTP commands on standard input (use as -bs)")
|
||||||
flag.BoolP("verbose", "v", false, "Ignored")
|
flag.BoolP("verbose", "v", false, "Ignored")
|
||||||
flag.Bool("i", false, "Ignored")
|
flag.BoolP("i", "i", false, "Ignored")
|
||||||
flag.Bool("o", false, "Ignored")
|
flag.BoolP("o", "o", false, "Ignored")
|
||||||
flag.Bool("t", false, "Ignored")
|
flag.BoolP("t", "t", false, "Ignored")
|
||||||
|
|
||||||
// set the default help
|
// set the default help
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
|
Reference in New Issue
Block a user