mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2025-03-15 13:04:46 +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:
|
deps:
|
||||||
go get github.com/mailhog/MailHog-Server
|
go get github.com/mailhog/MailHog-Server
|
||||||
go get github.com/mailhog/MailHog-UI
|
go get github.com/mailhog/MailHog-UI
|
||||||
|
go get github.com/mailhog/mhsendmail
|
||||||
cd ../MailHog-UI; make bindata
|
cd ../MailHog-UI; make bindata
|
||||||
go get github.com/mailhog/http
|
go get github.com/mailhog/http
|
||||||
go get github.com/ian-kent/go-log/log
|
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
|
* Lightweight and portable
|
||||||
* No installation required
|
* 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
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
11
main.go
11
main.go
|
@ -15,6 +15,7 @@ import (
|
||||||
cfgui "github.com/mailhog/MailHog-UI/config"
|
cfgui "github.com/mailhog/MailHog-UI/config"
|
||||||
"github.com/mailhog/MailHog-UI/web"
|
"github.com/mailhog/MailHog-UI/web"
|
||||||
"github.com/mailhog/http"
|
"github.com/mailhog/http"
|
||||||
|
"github.com/mailhog/mhsendmail/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
var apiconf *cfgapi.Config
|
var apiconf *cfgapi.Config
|
||||||
|
@ -30,6 +31,16 @@ func configure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
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()
|
configure()
|
||||||
|
|
||||||
exitCh = make(chan int)
|
exitCh = make(chan int)
|
||||||
|
|
Loading…
Add table
Reference in a new issue