Hi all,
i still working on a transportAgent which is able to insert a graphic as attachment to all outgoing Tnef mails.
I include this attachment with following code:
But in this case, line 2 gives me an error:
Error 1 Property or indexer 'Microsoft.Exchange.Data.Transport.Email.Attachment.AttachmentType' cannot be assigned to -- it is read only
My Question is: How is it possible to change this attribute or is there another way to put headers like Content-Disposition?
i still working on a transportAgent which is able to insert a graphic as attachment to all outgoing Tnef mails.
I include this attachment with following code:
Attachment logo = emailMessage.Attachments.Add(showAsFilename); | |
logo.AttachmentType = AttachmentType.Inline; | |
logo.ContentType = "image/gif"; | |
Stream logologo_stream = logo.GetContentWriteStream(); | |
logo_stream.Write(logo_binary, 0, logo_binary.Length); | |
logo_stream.Flush(); | |
logo_stream.Close(); |
But in this case, line 2 gives me an error:
Error 1 Property or indexer 'Microsoft.Exchange.Data.Transport.Email.Attachment.AttachmentType' cannot be assigned to -- it is read only
My Question is: How is it possible to change this attribute or is there another way to put headers like Content-Disposition?