Program that can communicate with a smtp email server, JAVA Programming

Assignment Help:

Assignment

Your task in this assignment is to develop a Java program that can communicate with a real SMTP email server for sending emails. It should have a graphical user interface (GUI).

LEARNING GOALS

1.  To enhance the functionality of the program developed in Assignment 1 so that the program communicates with an SMTP server using TCP Sockets - i.e. to practise implementing networked applications. 

2.  To practise the development of a graphical user interface (GUI) and use of event handling in Java.

3.  To practise using the extensive Java libraries, e.g. for the TCP connection and the user interface development.

4.  To practise object-oriented development (structuring of program). 

PROGRAM DESCRIPTION

Your program must have the following parts: 

1.  An EmailSender object which receives an object of type Message (created in assignment 1) and sends it using a Socket connection to an SMTP server.

2.  The GUI must have: 

a. Text input fields for each required field, 

b.  a send button to send the email

c.  a clear (or restart) button to clear fields (to, from, subject, message etc)

d.  two text areas, 

i.  one to compose the email message and  ii.  A second to display server responses  

3.  A Logger class which makes a log entry whenever an email is sent or an unsuccessful attempt is made. The log entry is made in a file called 'emaillog.txt', which is in a subdirectory of the directory of the program. The subdirectory is called 'logs'. 

20/04/2011 17:45:55; [email protected]; [email protected]; "Coffee break"; status: success 111111@swin stands for the sender, 222222@swin. for the recipient, and "Coffee break" for  the subject line of the sent message.

4.  The code should be easy to read

 

PROGRAM USE CASE (FUNCTIONALITY)

1.  When the program is started (from command line using "java Test"), the user interface is shown. The sender field shows a default e-mail address.

2.  The user types the necessary data into the appropriate fields. The program validates the e-mail addresses. (The best time to do this is when the cursor leaves the field of an e-mail address.)

3.  When the user presses the Send button, the program creates a Message object and stores all the information in the fields of the user interface in the Message object. 

4.  The EmailSender receives the Message object and opens a connection to the SMTP server.

5.  The event is logged in emaillog.txt. Depending on whether the mail has been sent successfully, the status is 'success' or 'failure'.

6.  In the case of a failure, use the exception handling mechanism to return the error message to the GUI for display. Give as much detail to the user as you can, but not Java messages (users don't understand stack traces).

7.  If the message was sent successfully, clear all fields (except the field that shows server feedback) so that a new message can be typed. Alternatively, you can have a 'Clear' button.

DELIVERABLES

You must submit the following as part of the assignment

1.  Complete source code consisting of the Java classes described in assignments 1 and 2, possibly more.

2.  A UML class diagram of the program. The class diagram should show the names of the classes, the attributes and methods of the classes as well as the relationships between the classes.


Related Discussions:- Program that can communicate with a smtp email server

What are the various struts tag libraries, The Struts tag libraries are: ...

The Struts tag libraries are: ? HTML Tags ? Logic Tags ? Template Tags ? Bean Tags ? Tiles Tags ? Nested Tags

Create a link list iterator, In this assignment, you will gain experience i...

In this assignment, you will gain experience implementing the java.util.List interface. This includes writing an inner class called Node and another inner class called CS228LinkedL

What is file transfer protocol, What is File Transfer Protocol? This pr...

What is File Transfer Protocol? This protocol is used to upload the files on remote computers. This is used to transfer files among computer on TCP/IP network e.g. internet and

How can you performance tune your database?, 1. De normalizes your tables w...

1. De normalizes your tables where required. 2. Proper use of index columns: An index based on numeric parts is more efficient than an index based on character columns. 3. Re

Explain primitive data types in java, Explain primitive data types in java?...

Explain primitive data types in java? Java's primitive data types are extremely similar to those of C. They involve boolean, byte, short, long, int, float, double, and char. Th

How dbms is better to use than flat-file database, How can you justify that...

How can you justify that a DBMS is better to use than Flat-file database? A DBMS takes care of the storage, retrieval, and management of large data sets on a Database. It give

How to get data from the velocity page in a action class, We can get the va...

We can get the values in the action classes by using data.getParameter("variable name described in the velocity page");

Banknote ocr register anti fraud, Project Description: Introduction: ...

Project Description: Introduction: SID C.A. (integradores) is a software company in Venezuela 15 years ago, and we are exploring the possibility of making mobile developments

Kik messenger program, Kik Messenger is a plan mobile messenger like Skype....

Kik Messenger is a plan mobile messenger like Skype. It's available on each major smart phone for Android and Iphone. Here is the entire process: Could be able to add multipl

Use javascript create some basic client-side validation, The last exercise ...

The last exercise of each assignment will be continuous from assignment to assignment and will have the goal of building an e-store website by the end of the course. Date & Tim

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd