Skip to content

Commit

Permalink
Check the Headers for MessageId before assigning a value in MimeMessa…
Browse files Browse the repository at this point in the history
…ge .ctor

Fixes issue #747
  • Loading branch information
jstedfast committed Jan 21, 2022
1 parent 5e2eb9f commit 41d643b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MimeKit/MimeMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public MimeMessage (params object[] args) : this (ParserOptions.Default.Clone ()
Date = DateTimeOffset.Now;
if (!Headers.Contains (HeaderId.Subject))
Subject = string.Empty;
if (messageId == null)
if (!Headers.Contains (HeaderId.MessageId))
MessageId = MimeUtils.GenerateMessageId ();
}

Expand Down

0 comments on commit 41d643b

Please sign in to comment.