Skip to content

go-mail

Very basic mail implementation in Go. Created to do simple tests as an unprivileged user from a single binary.

Usage

Note that go-mail comes with a full set of defaults. All you will probably need is to set the --smtp and provide a to-addr.

go-mail --smtp smtp://127.0.0.1:10025 test@test.be
cat somefile.txt | go-mail --smtp smtp://127.0.0.1:10025 test@test.be

Install

# homebrew
brew install stenic/tap/go-mail

# gofish
gofish rig add https://github.com/stenic/fish-food
gofish install github.com/stenic/fish-food/go-mail

# scoop
scoop bucket add go-mail https://github.com/stenic/scoop-bucket.git
scoop install go-mail

# go
go install github.com/stenic/go-mail@latest

# docker 
docker pull ghcr.io/stenic/go-mail:latest

# dockerfile
COPY --from=ghcr.io/stenic/go-mail:latest /go-mail /usr/local/bin/

For even more options, check the releases page.

Run

# Installed
go-mail -h
# Docker
docker run -ti ghcr.io/stenic/go-mail:latest -h
# Kubernetes
kubectl run go-mail --image=ghcr.io/stenic/go-mail:latest --restart=Never -ti --rm -- -h

Documentation

$ go-mail -h                                                                                                
go-mail

Usage:
  go-mail [-s subject] to-addr ... [flags]

Flags:
  -b, --bcc-addr stringArray   Send a blink carbon copy to this address
      --body string            Define the message body (default "Hello from go-mail")
  -c, --cc-addr stringArray    Send a carbon copy to this address
  -f, --from string            Send the mail from this address (default "go-mail@example.com")
  -h, --help                   help for go-mail
      --smtp string            Define the smtp server (default "smtp://127.0.0.1:25")
  -s, --subject string         Subject of the mail (default "Test mail from go-mail")

Badges

Release Software License Build status Conventional Commits

License

License

About

Minimal mail implementation in go

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages