Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bugfix BuildHeader

Copy date from message header, if specified. See #67
  • Loading branch information...
commit 0c44362539463faa8b0adef4058f5dc6ae7de4f9 1 parent bc309a9
@smiley22 authored
Showing with 5 additions and 3 deletions.
  1. +1 −1  License.md
  2. +3 −1 MailMessage.cs
  3. +1 −1  Readme.md
View
2  License.md
@@ -1,6 +1,6 @@
### The MIT License
-Copyright (c) 2012 Torben Könke
+Copyright (c) 2012-2014 Torben Könke
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
4 MailMessage.cs
@@ -62,9 +62,11 @@ internal static class MailMessageExtension {
"Content-Type", "Content-Transfer-Encoding", "Priority",
"Reply-To", "X-Priority", "Importance", "Sender", "Message-Id"
};
+ var date = String.IsNullOrEmpty(m.Headers["Date"]) ? DateTime.Now.ToString("R") :
+ m.Headers["Date"];
NameValueCollection header = new NameValueCollection() {
{ "MIME-Version", "1.0" },
- { "Date", DateTime.Now.ToString("R") },
+ { "Date", date },
{ "Priority", PriorityMap[m.Priority] },
{ "Importance", ImportanceMap[m.Priority] }
};
View
2  Readme.md
@@ -51,7 +51,7 @@ further details on using the classes and methods exposed by the S22.Imap namespa
### Credits
-This library is copyright © 2012-2013 Torben Könke.
+This library is copyright © 2012-2014 Torben Könke.
Parts of this library are based on the AE.Net.Mail project (copyright © 2012 Andy Edinborough).
Please sign in to comment.
Something went wrong with that request. Please try again.