go-gomail / gomail

The best way to send emails in Go.
MIT License
4.37k stars 577 forks source link

Add Message-ID #36

Closed tgulacsi closed 9 years ago

tgulacsi commented 9 years ago

As per RFC822, email messages should have a Message-ID field. I know it's the message creator's responsibility, but at least we could help him by including a MakeMsgID function, as in https://github.com/tgulacsi/go/blob/master/i18nmail/msgid.go ?

If it's easier on you, I can send it as a PR, but first please vet this suggestion.

alexcesaro commented 9 years ago

Thanks for your suggestion but I don't want to add such a function. Here are the reasons:

vzool commented 2 years ago
* Implementing MakeMsgID is quite simple and only requires a small amount of code.

@alexcesaro So, is this correct:

message := gomail.NewMessage()
message.SetHeader("Message-ID", uuid.New().String())