I am trying to write a proc that will take in as a parameter a MailMessage object, and the split it apart to store the subject, body, to addresses, from address, and attachments (the hard part) in a database so the email can be sent at some point in the future.
My first take on this was to rip out the parts I need and store them in a database, and that works great except for attachments. I can't figure out how to loop through the collection and then actually do anything with them.
It there an easy way to serialize a MailMessage object that will actually take the content of the attachments with it?
Am I doing this all wrong? Has anyone done this before?