I was able to resolve it. Looks like the MemoryStream
have the correct stream and also the ContentStream
of the message object has the correct sizes, but the Stream postion had moved to the end of the stream and hence when the message is actually being sent, it actualy has nothing.
So make sure to reposition the stream back to origin before adding it to AttachmentCollection
, something like
Seek(0, SeekOrigin.Begin)
especially when using streams wrapped in dlls, something might have moved them.