Could anyone please help me create a simple, basic email client and email server using UDP and get familiar with how SMTP works?
I have just started computer networking and I only need to know the steps involved.
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Internet RFCs (Request For Comments) are the best source for this kind of information: SMTP is outlined in RFC 821. The good news is that SMTP is a text-based protocol, just like HTTP and friends.
Here’s an example dialogue between client
Cand serverS(taken from wikipedia):Using UDP for email would not be the best idea, because UDP packets can be dropped. TCP would be better to use. But since you mention it’s an assignment, I guess it’s okay.
So first write your generic UDP client/server code. Then modify it to support SMTP commands.
I would start by implementing the simple
echoprotocol first. Or just search for some source code online in your favorite language for theechoprotocol. For example, if you wanted to use C++ with boost.asio for networking, it has demo code for a UDPechoclient and server. For Perl, there’s some simple UDP code here.Then skim over the parts of RFC 821 you need, and go from there. I’m guessing since it’s an assignment, you might not need everything in the protocol.
Since the protocol is just simple text commands and responses, parsing it shouldn’t be a problem.