Please start new threads when your question has changed and ask specific questions. If you're asking how to make a mailserver I will go out on a limb and say that you are probably not prepared to develop one. Its not something you can whip up in a week. Start by opening a TcpSocket to accept ingress connections on port:25 and parsing mail headers. Please post questions related to this topic in a new thread.