aboutsummaryrefslogtreecommitdiff
path: root/cmd/koushin
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/koushin')
-rw-r--r--cmd/koushin/main.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/cmd/koushin/main.go b/cmd/koushin/main.go
index 6e364cb..d30cb85 100644
--- a/cmd/koushin/main.go
+++ b/cmd/koushin/main.go
@@ -9,14 +9,19 @@ import (
)
func main() {
- if len(os.Args) != 2 {
- fmt.Println("usage: koushin imaps://<host>:<port>")
+ if len(os.Args) != 2 && len(os.Args) != 3 {
+ fmt.Println("usage: koushin <IMAP URL> [SMTP URL]")
return
}
- url := os.Args[1]
+ imapURL := os.Args[1]
- e := koushin.New(url)
+ var smtpURL string
+ if len(os.Args) == 3 {
+ smtpURL = os.Args[2]
+ }
+
+ e := koushin.New(imapURL, smtpURL)
e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.Logger.Fatal(e.Start(":1323"))