---
> go-message already has a helper to generate Message-Id header fields
Oh woops, silly me! Let me know if this patch looks good, it overwrites
the Message-Id header as requested!
The only thing I noticed is that the header is defined as "Message-Id"
rather than "Message-ID", not a big deal but I don't think it's 100%
RFC compliant as is.
plugins/base/smtp.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/base/smtp.go b/plugins/base/smtp.go
index 19c9e0b..de4753f 100644
--- a/plugins/base/smtp.go+++ b/plugins/base/smtp.go
@@ -138,7 +138,8 @@ func (msg *OutgoingMessage) WriteTo(w io.Writer) error {
if msg.InReplyTo != "" {
h.Set("In-Reply-To", msg.InReplyTo)
}
- // TODO: set Message-ID++ h.Set("Message-Id", mail.GenerateMessageID()) mw, err := mail.CreateWriter(w, h)
if err != nil {
--
2.28.0
Thanks! Pushed with a minor edit to change indentation to tabs instead
of spaces.
On Wednesday, August 5, 2020 1:54 AM, Jesse Olson <j3s@c3f.net> wrote:
> --->> > go-message already has a helper to generate Message-Id header fields>> Oh woops, silly me! Let me know if this patch looks good, it overwrites> the Message-Id header as requested!>> The only thing I noticed is that the header is defined as "Message-Id"> rather than "Message-ID", not a big deal but I don't think it's 100%> RFC compliant as is.
Message header names are not case-sensitive, so this shouldn't be an
issue.
August 5, 2020 8:01 AM, "Simon Ser" <contact@emersion.fr> wrote:
> Thanks! Pushed with a minor edit to change indentation to tabs instead> of spaces.
Derp! I'll be sure to gofmt all future patches.
Thanks for helping turn this around so quickly. It sounds like you were
interested in keeping other Message-ID's around if they had already existed,
is that work you're interested in having done? I'd be happy to take a stab at it.
On Wednesday, August 5, 2020 8:10 PM, <j3s@c3f.net> wrote:
> August 5, 2020 8:01 AM, "Simon Ser" contact@emersion.fr wrote:>> > Thanks! Pushed with a minor edit to change indentation to tabs instead> > of spaces.>> Derp! I'll be sure to gofmt all future patches.>> Thanks for helping turn this around so quickly. It sounds like you were> interested in keeping other Message-ID's around if they had already existed,> is that work you're interested in having done? I'd be happy to take a stab at it.
Yes, of course! I think it'll involve adding a MessageID field to
OutgoingMessage. Feel free to ask questions if you have some!