Home All Groups Group Topic Archive Search About

Content-Type of MailMessage

Author
16 Oct 2006 9:31 PM
JS Petit
Why can't we change the content-type setting of a System.Net.Mail.MailMessage?

We can change this value for Attachments, but not for the message itself...

It's the only thing that prevents me from creating signed/encrypted
messages...

I can sign the message, add the smime.p7s but I can't change the message
content type to multipart/signed...

And adding the header doesn't help, the SmtpClient adding a Content-Type
automatically...

In fact, if the MailMessage would contain the same header properties
(Content-xyz) as the Attachment, it would give a lot of flexibility...

As for backward compatibility, not setting them would leave the default on,
yes?

In the meantime, I'll have to try another workaround: put the
encrypted/signed message in an attachment...

AddThis Social Bookmark Button