Computers and Technology
Computers and Technology, 21.05.2020 15:59, bm42400

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 an 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. You are to provide the complete code for your SMTP mail client. Skeleton Python Code for the Mail Clientfrom socket import *msg = "\r\n I love computer networks!"endmsg = "\r\n.\r\n"# Choose a mail server (e. g. Google mail server) and call it mailserver mailserver = #Fill in start #Fill in end# Create socket called clientSocket and establish a TCP connection with mailserver#Fill in start#Fill in endrecv = clientSocket. recv(1024)print recv if recv[:3] != '220': print '220 reply not received from server.' # Send HELO command and print server response. heloCommand = 'HELO Alice\r\n' clientSocket. send(heloCommand) recv1 = clientSocket. recv(1024) print recv1 if recv1[: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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:40, jacelee17631
Write c function that can replace all the positive elements to 0 and negative to 1 in undefined length one-dimensional array. test your program in the main program by defining one-dimensional array of 6 elements
Answers: 1
image
Computers and Technology, 22.06.2019 05:00, brylove603
Pls do you believe that the use of 3d animation has grown in feature films over the last few years? if so, do you think the trend will continue? what are the forces driving this trend?
Answers: 2
image
Computers and Technology, 22.06.2019 20:00, Jana1517
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i. e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, powellmj9216
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
Do you know the correct answer?
Your task is to develop a simple mail client that sends email to any recipient. Your client will nee...

Questions in other subjects: