I am trying to write a proc that will take a MailMessage object as a parameter and split it into parts for storing the object, body, addresses, addresses and attachments (hard part) in the database, so the letter may be sent at some point in the future.
My first take on this was to rip out the parts I needed and store them in a database, and this works great, except for the attachments. I canβt figure out how to get through the collection, and then actually do something with them.
Is there an easy way to serialize a MailMessage object that will actually use the contents of the attachments with it?
Am I doing all this wrong? Has anyone done this before?
source share