+1 vote

Hello.

I am writing an application that includes email as one of its modules. What I wanted to do is to be able to send and receive emails from my application using your library. Part of the requirements is to store the entire email information into a database. I can see there is an IMail object that has all of the properties I needed. What I would like to know is if it's best to create the table with the individual properties of the IMail object or is there a bare minimum so I am not creating all properties? What do you recommend?

Thank you.

by (600 points)

1 Answer

0 votes
 
Best answer

Storage is cheap: save the original, raw eml bytes you received from Imap.GetMessageByUID or Pop3.GetMssageByUID. This way you always have the original data if you need to extract more information from it.

Then, depending on your needs, save what your application requires to work fast.

Most likely those will be common properties like from, to, subject, message text and html, attachment names.

If you want more data you can always retrieve eml and parse it using MailBuilder class.

by (301k points)
selected by
Thank you for your guidance.
...