diff --git a/MimeKit/Utils/ParseUtils.cs b/MimeKit/Utils/ParseUtils.cs index 1faec0d64d..f5c7f98e83 100644 --- a/MimeKit/Utils/ParseUtils.cs +++ b/MimeKit/Utils/ParseUtils.cs @@ -493,6 +493,12 @@ public static bool TryParseMsgId (byte[] text, ref int index, int endIndex, bool token.Append ('@'); index++; + // Note: some Message-Id's are broken and in the form "" + // + // See https://github.com/jstedfast/MimeKit/issues/962 for details. + while (index < endIndex && text[index] == (byte) '@') + index++; + if (!SkipCommentsAndWhiteSpace (text, ref index, endIndex, throwOnError)) return false;