Skip to content

Commit

Permalink
Fix Message-ID creation
Browse files Browse the repository at this point in the history
  • Loading branch information
cevatbarisyilmaz committed Dec 9, 2020
1 parent f8ba45a commit 9aeeffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion send.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *Service) Send(m *Mail) (map[string]error, error) {
msgID := s.nextMessageID
s.nextMessageID += uint16(s.rand.Intn(16))
s.nextMessageIDMu.Unlock()
m.Headers["Message-ID"] = []byte("<" + strconv.Itoa(int(time.Now().Unix())) + "." + strconv.Itoa(rand.Int()) + "." + strconv.Itoa(int(msgID)) + "@movieofthenight.com>")
m.Headers["Message-ID"] = []byte("<" + strconv.Itoa(int(time.Now().Unix())) + "." + strconv.Itoa(rand.Int()) + "." + strconv.Itoa(int(msgID)) + "@" + s.domain + ">")
from, err := mail.ParseAddress(string(m.Headers["From"]))
if err != nil {
return nil, errors.Wrap(err, "parsing from header failed")
Expand Down

0 comments on commit 9aeeffc

Please sign in to comment.