mirror of
https://github.com/axllent/mailpit.git
synced 2026-03-02 22:47:01 +00:00
22 lines
444 B
Go
22 lines
444 B
Go
// Package main is the entrypoint
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"strings"
|
|
|
|
"github.com/axllent/mailpit/cmd"
|
|
sendmail "github.com/axllent/mailpit/sendmail/cmd"
|
|
)
|
|
|
|
func main() {
|
|
// if the command executable contains "send" in the name (eg: sendmail), then run the sendmail command
|
|
if strings.Contains(strings.ToLower(filepath.Base(os.Args[0])), "send") {
|
|
sendmail.Run()
|
|
} else {
|
|
// else run mailpit
|
|
cmd.Execute()
|
|
}
|
|
}
|