Skip to content

A tiny sendmail replacement for environments with smarthosts

License

Notifications You must be signed in to change notification settings

squash/gosendmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gosendmail

A tiny sendmail replacement for environments with smarthosts, based on mhsendmail

> go get github.com/squash/gosendmail

> gosendmail [email protected] <<EOF
From: App <app@mlocal>
To: Test <test@mlocal>
Subject: Test message

Some content!
EOF

gosendmail looks for default options in /etc/gosendmail.toml. An example is provided.

You can override the from address (for SMTP MAIL FROM):

gosendmail --from="[email protected]" [email protected] ...

Or pass in multiple recipients:

gosendmail --from="admin@ocal" [email protected] [email protected] ...

Or override the destination SMTP server:

gosendmail --smtp-addr="localhost:1026" test@local ...

To use from php.ini

sendmail_path = "/usr/local/bin/gosendmail"

For use in containers

Some container bases will require you to use a statically linked binary, which you can build with:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w -extldflags "-static"'

Licence

Original Copyright ©‎ 2015 - 2016, Ian Kent (http://iankent.uk) (c) 2020 Josh Grebe (https://github.com/squash/)

Released under MIT license, see LICENSE for details.

About

A tiny sendmail replacement for environments with smarthosts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages