Created
April 1, 2011 15:21
-
-
Save KevM/898323 to your computer and use it in GitHub Desktop.
Extension class to make handling MailBee MailMessage IDs now that they have brackets in them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using MailBee.Mime; | |
| namespace Dovetail.Carrier.EmailServices | |
| { | |
| public static class MailMessageExtensions | |
| { | |
| public static string GetMessageIdSansBrackets(this string messageId) | |
| { | |
| return messageId.TrimStart('<').TrimEnd('>'); | |
| } | |
| public static string GetMessageFilename(this MailMessage message) | |
| { | |
| return message.MessageID.GetMessageIdSansBrackets() + ".eml"; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment