(Solved) : Socket Progrmming Assignment 3 Smtp End Lab Acquired Better Understanding Smtp Protocol Al Q42783079 . . .

Socket Progrmming Assignment 3: SMTP By the end of this lab, you will have acquired a better understanding of SMTP protocol.

Skeleton Python Code for the Mail Client from socket import * msg = rn I love computer networks! endmsg = rnrn # Ch

# Message ends with a single period. # Fill in start # Fill in end # Send QUIT command and get server response. # Fill in sta

Socket Progrmming Assignment 3: SMTP By the end of this lab, you will have acquired a better understanding of SMTP protocol. You will also gain experience in implementing a standard protocol using Python. Your task is to develop a simple mail client that sends email to any recipient. Your client will need to connect to a mail server, dialogue with the mail server using the SMTP protocol, and send an email message to the mail server. Python provides a module, called smtplib, which has built in methods to send mail using SMTP protocol. However, we will not be using this module in this lab, because it hide the details of SMTP and socket programming. In order to limit spam, some mail servers do not accept TCP connection from arbitrary sources. For the experiment described below, you may want to try connecting both to your university mail server and to a popular Webmail server, such as a AOL mail server. You may also try making your connection both from your home and from your university campus. Code Below you will find the skeleton code for the client. You are to complete the skeleton code. The places where you need to fill in code are marked with #Fill in start and #Fill in end. Each place may require one or more lines of code. Additional Notes In some cases, the receiving mail server might classify your e-mail as junk. Make sure you check the junk/spam folder when you look for the e-mail sent from your client. What to Hand in In your submission, you are to provide the complete code for your SMTP mail client as well as a screenshot showing that you indeed receive the e-mail message. Skeleton Python Code for the Mail Client from socket import * msg = “rn I love computer networks!” endmsg = “rnrn” # Choose a mail server (e.g. Google mail server) and call it mailserver mailserver = #Fill in start #Fill in end # Create socket called client Socket and establish a TCP connection with mailserver #Fill in start #Fill in end recv = client Socket.recv(1024) print recv if recv [:3] != ‘220’: print “220 reply not received from server.’ # Send HELO command and print server response. heloCommand = ‘HELO Alicern’ client Socket.send(heloCommand) recvl – client Socket.recv(1024) print recvl if recvl[:3] != ‘250’: print 250 reply not received from server.’ # Send MAIL FROM command and print server response. # Fill in start # Fill in end # Send RCPT TO command and print server response. # Fill in start # Fill in end # Send DATA command and print server response. # Fill in start # Fill in end # Send message data. # Fill in start # Fill in end # Message ends with a single period. # Fill in start # Fill in end # Send QUIT command and get server response. # Fill in start # Fill in end Show transcribed image text Socket Progrmming Assignment 3: SMTP By the end of this lab, you will have acquired a better understanding of SMTP protocol. You will also gain experience in implementing a standard protocol using Python. Your task is to develop a simple mail client that sends email to any recipient. Your client will need to connect to a mail server, dialogue with the mail server using the SMTP protocol, and send an email message to the mail server. Python provides a module, called smtplib, which has built in methods to send mail using SMTP protocol. However, we will not be using this module in this lab, because it hide the details of SMTP and socket programming. In order to limit spam, some mail servers do not accept TCP connection from arbitrary sources. For the experiment described below, you may want to try connecting both to your university mail server and to a popular Webmail server, such as a AOL mail server. You may also try making your connection both from your home and from your university campus. Code Below you will find the skeleton code for the client. You are to complete the skeleton code. The places where you need to fill in code are marked with #Fill in start and #Fill in end. Each place may require one or more lines of code. Additional Notes In some cases, the receiving mail server might classify your e-mail as junk. Make sure you check the junk/spam folder when you look for the e-mail sent from your client. What to Hand in In your submission, you are to provide the complete code for your SMTP mail client as well as a screenshot showing that you indeed receive the e-mail message.
Skeleton Python Code for the Mail Client from socket import * msg = “rn I love computer networks!” endmsg = “rnrn” # Choose a mail server (e.g. Google mail server) and call it mailserver mailserver = #Fill in start #Fill in end # Create socket called client Socket and establish a TCP connection with mailserver #Fill in start #Fill in end recv = client Socket.recv(1024) print recv if recv [:3] != ‘220’: print “220 reply not received from server.’ # Send HELO command and print server response. heloCommand = ‘HELO Alicern’ client Socket.send(heloCommand) recvl – client Socket.recv(1024) print recvl if recvl[:3] != ‘250’: print 250 reply not received from server.’ # Send MAIL FROM command and print server response. # Fill in start # Fill in end # Send RCPT TO command and print server response. # Fill in start # Fill in end # Send DATA command and print server response. # Fill in start # Fill in end # Send message data. # Fill in start # Fill in end
# Message ends with a single period. # Fill in start # Fill in end # Send QUIT command and get server response. # Fill in start # Fill in end

Expert Answer


Answer to Socket Progrmming Assignment 3: SMTP By the end of this lab, you will have acquired a better understanding of SMTP proto…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us