Skip to content

Commit

Permalink
Fix: Add single dash arguments support to sendmail command (#123)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
richieri and richieri-bps authored Jun 6, 2023
1 parent c150f1b commit a2ab350
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/sendmail.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.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().Bool("i", false, "Ignored")
sendmailCmd.Flags().Bool("o", false, "Ignored")
sendmailCmd.Flags().Bool("t", false, "Ignored")
sendmailCmd.Flags().BoolP("i", "i", false, "Ignored")
sendmailCmd.Flags().BoolP("o", "o", false, "Ignored")
sendmailCmd.Flags().BoolP("t", "t", false, "Ignored")
}
6 changes: 3 additions & 3 deletions sendmail/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ func Run() {
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.BoolP("verbose", "v", false, "Ignored")
flag.Bool("i", false, "Ignored")
flag.Bool("o", false, "Ignored")
flag.Bool("t", false, "Ignored")
flag.BoolP("i", "i", false, "Ignored")
flag.BoolP("o", "o", false, "Ignored")
flag.BoolP("t", "t", false, "Ignored")

// set the default help
flag.Usage = func() {
Expand Down

0 comments on commit a2ab350

Please # to comment.