1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +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:
Ronaldo Richieri 2023-06-06 16:33:47 -03:00 committed by GitHub
parent c150f1ba50
commit a2ab350aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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")
}

View File

@ -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() {