CPE 400/600 Computer Communication Networks

Fall 2012

Programming Assignment 1: Mail Client

Due on Monday, Oct 15 at 11:00 am

The goal of this programming assignment is to create a simple mail client that sends email to any recipient. Your client will need to establish a TCP connection with a mail server ( e. g., a Google mail server), dialogue with the mail server using the SMTP protocol, send an email message to a recipient ( e. g., your friend) via the mail server, and finally close the TCP connection with the mail server.

For this assignment, the companion Web site provides the skeleton code for your client. Your job is to complete the code and test your client by sending email to different user accounts. You may also try sending through different servers (for example, through a Google mail server and through your university mail server).

Graduate Students: Complete either of the following tasks.

  1. Mail servers like Google mail (address: smtp.gmail.com, port: 587) requires your client to add a Transport Layer Security (TLS) or Secure Sockets Layer (SSL) for authentication and security reasons, before you send MAIL FROM command. Add TLS/SSL commands to your existing ones and implement your client using Google mail server at above address and port.

  2. Your current SMTP mail client only handles sending text messages in the email body. Modify your client such that it can send emails with both text and images.

Bonus: Complete one of the above tasks for an additional grade of 5 points.

What to turn in: A soft-copy of your source code and program documentation to be uploaded to WebCampus.