Mailosaur allows you to automate tests involving email. Allowing you to perform end-to-end automated and functional email testing.
go get -u github.com/jslang/mailosaur-go
import mailosaur
c := mailosaur.NewClient("<yourapikey>", "<yourserverid>")
msgs, err := c.ListMessages()
...
msg, err := c.GetMessage(msgs[0].Id)
...
err = c.DeleteMessage(msg.Id)
...
err = c.DeleteMessages()
...
Unit tests
go test ./mailosaur
Integration tests, requires a valid mailosaur api key and server id to work:
MAILOSAUR_API_KEY=<apikey> MAILOSAUR_SERVER_ID=<serverid> go test ./test/integration_test.go
Completed:
* Messages API
TODO:
* Files API
* Servers API
* Analysis API