summaryrefslogtreecommitdiff
path: root/cmd/ponzu/vendor/github.com/nilslice/email/email.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ponzu/vendor/github.com/nilslice/email/email.go')
-rw-r--r--cmd/ponzu/vendor/github.com/nilslice/email/email.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/ponzu/vendor/github.com/nilslice/email/email.go b/cmd/ponzu/vendor/github.com/nilslice/email/email.go
index 9d613c8..15f0a49 100644
--- a/cmd/ponzu/vendor/github.com/nilslice/email/email.go
+++ b/cmd/ponzu/vendor/github.com/nilslice/email/email.go
@@ -87,14 +87,14 @@ func send(m Message, c *smtp.Client) error {
}
if m.From != "" {
- _, err = msg.Write([]byte("From: " + m.From + "\r\n"))
+ _, err = msg.Write([]byte("From: <" + m.From + ">\r\n"))
if err != nil {
return err
}
}
if m.To != "" {
- _, err = msg.Write([]byte("To: " + m.To + "\r\n"))
+ _, err = msg.Write([]byte("To: <" + m.To + ">\r\n"))
if err != nil {
return err
}
@@ -110,5 +110,10 @@ func send(m Message, c *smtp.Client) error {
return err
}
+ err = c.Quit()
+ if err != nil {
+ return err
+ }
+
return nil
}