Stream as an Attachment to System.Net.Mail is 0 bytes
I've got a project where I'm using a PDF generator to send a file to a user. We'd like to give the user the option to attach this file to an email instead, and we're having trouble using the Stream object and Attachment logic together. We start with ABCpdf, which has two save methods: it can save to a Stream, or if you give it a string, it'll try to save to a file on the disk there. We've done both no problem. Stream stream = new MemoryStream(); myPdf.Save(stream); Everything is mostly cool at this point - stream has several kilobytes of data, and if you .Save() to a file, you get an actual