It sounds as if you are trying to create an email service like GMail or Yahoo Mail as opposed to an email client. If that is the case, I think that you are into something pretty complex if you try to build it yourself. There are many mail server systems available. The easiest course of action would be to install one of them and use that. If you really want to build something yourself, you can still download one or two of the open source mail servers to get an idea of the size and the complexity of the work involved. That might change your mind. You can find a comparison of mail servers (with links) here.
chrishea
Nearly a Posting Virtuoso
1,489 posts since Sep 2008
Reputation Points: 223
Solved Threads: 243
Skill Endorsements: 5