Hi there,
We are using your mail library to process mail messages, and we run into a case where we try to create a ComponentPro.Net.Mail.MailMessage object from a stream. The stream represents an Outlook .msg file.
Our code is something like this
using (System.IO.Stream inputData = inputFileData.CreateDataStream())
{
try
{
Email = new MailMessage(inputData);
}
catch(Exception ex)
{
/// …
}
And the exception we’re getting is an System.ArgumentException with the text “Invalid character at position 19.\r\nParameter name: name”.
The stack trace in the exception looks like
at ComponentPro.Net.Mail.AttachmentBase.c_KTF(String c_SMC, String c_EUF)
at ComponentPro.Net.Mail.Attachment.LoadContentFromStream(Stream source, String name, String mediaType)
at ComponentPro.Net.Mail.MailMessage.c_D5F(AttachmentCollection c_E4F, Stream c_I6D, ContentType c_J6D, String c_OLC, String c_ILF, String c_Y5F)
at ComponentPro.Net.Mail.MailMessage.c_CQD(c_CP c_A5B)
at ComponentPro.Net.Mail.MailMessage.Load(Stream input)
at (our code):line 104
so maybe there is something about an attachment it does not like. One of the attachments is called 'GMK vorläufige Tagesordnung.doc'. Maybe it doesn’t like the a-umlaut character.
Version numbers:
ComponentPro.Mail.dll: 5.2.40.9092
ComponentPro.Common.dll: same
Do you have an update available that may fix this problem?
asked 12/6/2017 9:25:28 PM