We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f0d9179 + 726ea34 commit a7968a9Copy full SHA for a7968a9
CHANGELOG
@@ -1,7 +1,8 @@
1
1.3.0
2
-----
3
4
- * Allow to set email sender
+ * Allow to change the hostname used to send emails (via `MAILHOST` env var)
5
+ * Allow to set email sender (via `MAILFROM` env var)
6
* Fix timeout support when the command starts sub-processes
7
* Add go.mod
8
main.go
@@ -191,8 +191,11 @@ func (r *result) sendEmail() {
191
}
192
193
func (r *result) subject() string {
194
- hostname, err := os.Hostname()
195
- if err != nil {
+ hostname := "undefined"
+ var err error
196
+ if env := os.Getenv("MAILHOST"); env != "" {
197
+ hostname = env
198
+ } else if hostname, err = os.Hostname(); err != nil {
199
hostname = "undefined"
200
201
0 commit comments