Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Your task in this assignment is to develop a graphical user interface based java program that can communicate with a real SMTP email server for sending emails

AIMS:

1. To understand actual communication with an SMTP server can be achieved using TCP Sockets.

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

3. To send an actual email using your GUI client

Stage 1

- To build a simple Pretend Mail Client (PMC) that prompts the user for typical email fields and then outputs SMTP protocol messages to the screen.

- To understand and construct SMTP protocol messages.

- To understand OOP design.

1. The following command is used to run your program and accept console input (i.e. input from the keyboard) for email fields and message body, java MyPMC

For example, if the user provides information for the fields of MAIL FROM, TO, SUBJECT, EMAIL-TEXT, the output format should be as follows:

HELO swin.edu.au
MAIL FROM: abc@edu.au
RCPT TO: xyz@edu.au

DATA
Subject: Hello
This is message.

This output should be displayed to the screen.

2. Accept console input of more complicated emails that contain various combinations of optional fields, in particular Carbon Copy ("CC:"), and Blind Carbon copy ("BCC:"). For this task, assume that there is at most one email address in each field. That is, if the field of CC and BCC are also provided by the user (e.g. CC to cc@swin.edu.au and BCC to bcc@swin.edu.au), the output format should be:
HELO swin.edu.au

MAIL FROM: abc@edu.au
RCPT TO: xyz@edu.au
RCPT TO: cc@edu.au
RCPT TO: bcc@edu.au

DATA
Subject: Hello
CC: cc@swin.edu.au
BCC: bcc@swin.edu.au
This is message
.

You need to check if the field of CC/BCC is empty (i.e. check if the user enters an email address of CC/BCC). If the fields of CC and BCC are not provided by the user, the output should be that one shown in Task 1.

3. Allow multiple comma separated addresses for each relevant field. For example, the user is allowed to enter more than one email address for the field of TO (e.g., person1@swin.edu.au, person2@swin.edu.au). The output for this field should be:

RCPT TO: person1@edu.au

RCPT TO: person2@edu.au

4. Allow the user to send more than one email without having to restart the PMC.

5. Create a message class that includes fields of MAIL FROM, TO, CC, BCC, SUBJECT, EMAIL-TEXT. It should also include the methods of set and get for each field, e.g. for the field of From (i.e. for MAIL FROM), it should have the methods: setFrom and getFrom.

Use this class to declare 10 objects, e.g. Message [] m= new Message[10]; m[0] is used to store the first email you sent, m[1] is used to store the second email you sent, and so on. Just before exiting, your program should output the emails that you have sent. The format for each email should be the same as described in Tasks 1-3.

6. Your PMC should consist of at least 2 classes.

a. main class to get input and to control the program

b. message class

Stage 2

You are to develop a Java program that can communicate with a real SMTP email server for sending emails. Your program should provide a GUI (see a sample GUI below) and can successfully send the SMTP commands to the mail server

The requirements are as follows:

1. The Java source files created must compile.

2. The compiled program should be able to send an actual email using correct SMTP commands

3. The GUI program 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. a sent button to output those emails you have sent
e. two text areas,

i. one to compose the email message and

ii. a second to display server responses

2284_Communication with an SMTP server.png

Your program must perform the following tasks:

1. Accept minimal email parts for any email recipient [These parts MUST include fields to send messages using SMTP.]

2. Make sure you validate the email fields [This means anywhere you would need an email address, the string should be a valid email address.]

3. Have default values for the Mail From field as well as which SMTP server to send the emails to. The program should allow these values to be changed if desired by user

4. Your program should receive an acknowledgement from the SMTP server and present an appropriate message to the User as to the status of the sent message

5. Make sure your CC: and BCC: functions work as well.

6. The program responds appropriately to events like clicking of a send button

7. Allow users to send more than one email without having to restart the program.

8. Handling multiple comma separated email addresses for each relevant field such as TO, CC and BCC.

9. Use the message class you created in stage 1 for the output of those emails sent. You program should support the output up to 10 emails you have sent. (they can be displayed in the message area or on the console window)

You are also required to provide a technical report for your stage 2 program. The report should comprise of the following sections:

1. Title: Your name, Student ID, Team number (even if done individually)

2. A description for your GUI,

3. A description for the classes you created.

For your GUI description, you should describe the GUI components with their layout arrangement used in your program with a hierarchical structure, e.g. using a tree diagram. Here is an example of GUI design for a sample file called UI1.java.

1520_Communication with an SMTP server1.png

Or

fromBox (Box, layout: createHorizontalBox) includes:
"From:" ( JLabel )
fromField: ( JTextField )

Note that you should indicate the Class name (e.g. Box) and Layout (e.g. Horizontal) you used for a GUI component.

To describe the classes you created, you should provide the purpose of the class, and describe how to use each method (and each constructor if it has any) in this class.

Java, Programming

  • Category:- Java
  • Reference No.:- M9717235
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question?


Related Questions in Java

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As