0 votes
by (210 points)
edited

"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" looks like valid MIME type, but I get this exception:

System.ArgumentException: Media type is not valid.Název parametru: mediaType:    v Rebex.Mime.Headers.ContentType..ctor(String mediaType);    v Rebex.Mime.MimeEntity.aBj8qZ(Stream , String , String , ContentTransferEncoding );    v Rebex.Mime.MimeEntity.SetContent(Stream source, String name, String mediaType);    v Rebex.Mail.Attachment.SetContent(Stream source, String name, String mediaType);    v Rebex.Mail.Attachment..ctor(Stream contentStream, String name, String mediaType);

Erring line:

var att = new Rebex.Mail.Attachment(stream, fn, a.MediaType);

When I change MIME type to "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", it works fine - but I use MIME types supplied by webbrowser of user when uploading attachments, so I do not construct it by hand.

My DLLs have version "2.0.4444.0".

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (147k points)
edited

This is a bug and it has already been fixed in Rebex Secure Mail 2012 R2. Sorry for inconvenience! Upgrading to the latest release should solve this issue. Please log into our website to download the latest version.

...