pmengal / MailSystem.NET

Great email library for C#.
GNU Lesser General Public License v3.0
268 stars 136 forks source link

Last char of subject is ')' #41

Open babaOlya opened 6 years ago

babaOlya commented 6 years ago

If the last character of the message subject is ')', it is truncated when reading the subject property

babaOlya commented 6 years ago

I think to change the function StripComments to:

private static bool StripComments(ref string input) { var isSurroundedByComments = input.StartsWith("(") && input.EndsWith(")"); if(isSurroundedByComments){ input = input.Trim('(', ')'); } return isSurroundedByComments;

    }