subject
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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
question
Computers and Technology, 25.06.2019 05:00
Arun is 5 years older than anu. five years ago, the ratio of their ages was 3: 2 . find their present age
Answers: 2
You know the right answer?
Your task is to develop a simple mail client that sends email to any recipient. Your client will nee...
Questions
question
English, 11.10.2021 19:40
question
Spanish, 11.10.2021 19:40
question
Chemistry, 11.10.2021 19:40
question
Mathematics, 11.10.2021 19:40
Questions on the website: 13722363