mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-23 14:24:03 +00:00
Make MailHog sendmail
a shortcut to mhsendmail
for #45
This commit is contained in:
parent
3f4eeae146
commit
9dc6ad8ed4
3 changed files with 22 additions and 0 deletions
1
Makefile
1
Makefile
|
@ -14,6 +14,7 @@ fmt:
|
|||
deps:
|
||||
go get github.com/mailhog/MailHog-Server
|
||||
go get github.com/mailhog/MailHog-UI
|
||||
go get github.com/mailhog/mhsendmail
|
||||
cd ../MailHog-UI; make bindata
|
||||
go get github.com/mailhog/http
|
||||
go get github.com/ian-kent/go-log/log
|
||||
|
|
10
README.md
10
README.md
|
@ -48,6 +48,16 @@ MailHog is an email testing tool for developers:
|
|||
* Lightweight and portable
|
||||
* No installation required
|
||||
|
||||
#### sendmail
|
||||
|
||||
[mhsendmail](https://github.com/mailhog/mhsendmail) is a sendmail replacement for MailHog.
|
||||
|
||||
It redirects mail to MailHog using SMTP.
|
||||
|
||||
You can also use `MailHog sendmail ...` instead of the separate mhsendmail binary.
|
||||
|
||||
#### Web UI
|
||||
|
||||
![Screenshot of MailHog web interface](/docs/MailHog.png "MailHog web interface")
|
||||
|
||||
### Contributing
|
||||
|
|
11
main.go
11
main.go
|
@ -15,6 +15,7 @@ import (
|
|||
cfgui "github.com/mailhog/MailHog-UI/config"
|
||||
"github.com/mailhog/MailHog-UI/web"
|
||||
"github.com/mailhog/http"
|
||||
"github.com/mailhog/mhsendmail/cmd"
|
||||
)
|
||||
|
||||
var apiconf *cfgapi.Config
|
||||
|
@ -30,6 +31,16 @@ func configure() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
if len(os.Args) > 1 && os.Args[1] == "sendmail" {
|
||||
args := os.Args
|
||||
os.Args = []string{args[0]}
|
||||
if len(args) > 2 {
|
||||
os.Args = append(os.Args, args[2:]...)
|
||||
}
|
||||
cmd.Go()
|
||||
return
|
||||
}
|
||||
|
||||
configure()
|
||||
|
||||
exitCh = make(chan int)
|
||||
|
|
Loading…
Reference in a new issue