I've been searching Google/SO for the past 3 days without success and hoping someone can help or point me in the right direction.
We have a method (with a bunch to overloads) that sends emails. I'm tasked with saving the email into a database.
Question
How can I extract the contents of an attachment into a byte[]
in order to save it to the database?
I've read a lot of samples that saves attachments to disk, but I want to avoid saving to disk then reading that into memory (maybe that's why I haven't found anything because it's not possible, doubt it).