Skip to content

Commit

Permalink
Make sure messages created from SNM MailMessages have a Date header.
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed May 23, 2018
1 parent f2ff516 commit 627460e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MimeKit/MimeMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3539,6 +3539,9 @@ public static MimeMessage CreateFromMailMessage (MailMessage message)
else
msg.Subject = message.Subject ?? string.Empty;

if (!msg.Headers.Contains (HeaderId.Date))
msg.Date = DateTimeOffset.Now;

switch (message.Priority) {
case MailPriority.Normal:
msg.Headers.RemoveAll (HeaderId.XMSMailPriority);
Expand Down

0 comments on commit 627460e

Please sign in to comment.