Skip to content

Instantly share code, notes, and snippets.

@KevM
Created April 1, 2011 15:21
Show Gist options
  • Select an option

  • Save KevM/898323 to your computer and use it in GitHub Desktop.

Select an option

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.
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