Question:
Suppose I want to store an email, with attachment in an SQL database, is that feasible and/or practical using Chilkat.net? If so, how would you suggest I do that? I wasn’t sure if the GetXML or getMIME method would work better (or at all). Thanks in advance.
Answer:
If you want to save the entire email (attachments and all) to a database, I would recommend calling email.GetMime to get the complete MIME source of the email and then saving it in an appropriate database field. The DB field should be a "text" field capable of holding any amount of text. If you want to save only the attachments, I would write code to get the binary attachment data using email.GetAttachmentData and save it to a DB field, which should be of a type capable of any-size binary data such as images.