Aims1 to understand actual communication with an smtp

Assignment Help JAVA Programming
Reference no: EM13374934

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.

Write a program (e.g. called PMC.java). This program will perform the following tasks:

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 xxxx.edu.au
MAIL FROM: abc@xxxx.edu.au
RCPT TO: xyz@xxxx.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 optional combinations of extra fields, in particular Carbon Copy ("CC:"), 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 (eg. CC to cc@xxxx.edu.auand BCC to bcc@xxxx.edu.au), the output format should be:

HELO xxxx.edu.au
MAIL FROM: abc@xxxx.edu.au
RCPT TO: xyz@xxxx.edu.au
RCPT TO: cc@xxxx.edu.au
RCPT TO: bcc@xxxx.edu.au
DATA
Subject: Hello
CC: cc@xxxx.edu.au
BCC: bcc@xxxx.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@xxxx.edu.au,person2@xxxx.edu.au). The output for this field should be:

RCPT TO: person1@xxxx.edu.au
RCPT TO: person2@xxxx.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 15 marks (Due: 5:00pm Friday 23 May 2014)

You are to develop a Java program that can communicate with a real SMTP email server for sending emails. You 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

1029_Development of a graphical user interface.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 your 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 UI1.java.

2385_Development of a graphical user interface1.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 a class you created, and describe how to use each method (and each constructor if it has) in this class.
Your code should be easy to read and must be well commented.

For detailed marks distribution of this assignment refer to attached marking scheme.

Reference no: EM13374934

Previous Q& A

  Part 1 firm perspective1 use the following article and your

part 1 firm perspective1. use the following article and your own research to answer the following questionscompetitive

  For this assignment you will need to read the following

for this assignment you will need to read the following articlebuller p. f. amp mcevoy g.m. 2012 strategy human

  What cost cutting measures are proposed how will the

what cost cutting measures are proposed? how will the expanded coverage be paid for?for purposes of our discussion

  1 frequency distribution of a variable and bar graph of the

1. frequency distribution of a variable and bar graph of the same variable2. descriptives of a continuous mean median

  Use ruby on rials to design app video store will be your

use ruby on rials to design app video store will be your project it has to have a database and at least 4 pages style

  Part adescription evaluate a companys current performance

part adescription evaluate a companys current performance management system pms and describe improvements that may

  Part 1 mining information from sales data is a common task

part 1 mining information from sales data is a common task in both traditional and online stores. past sales

  Introductionresearch and discover more in-depth knowledge

introductionresearch and discover more in-depth knowledge about topics in pattern recognition.you need first to choose

  Q1 for the given circuit r20k and c1200pfanbsp is the

q1 . for the given circuit r20k and c1200pfanbsp is the circuit lpf or hpf?b sketch the frequency response of the

  Q1 for the given circuit determine v2 and ilq2 determine

q1. for the given circuit determine v2 and ilq2 determine the phase relation between vo and ig for the given network if

Reviews

Write a Review

 

Similar Q& A

  Morgellons disease is delusional

Why do some scientists say that Morgellons disease is delusional? When there have been fibers extracted from patients that cannot be identified? Isn't that physical proof that something is affecting these people physically?

  Write an application that enables users to enter student ID

Write an application that enables users to enter student ID and three exam scores. Provide a method to compute and returnthe overall exam average.  Provide another method that prints all scores and the average value formatted with no digits to the ri..

  Writing a java program that provides simple statistics

You will be writing a Java program that provides simple statistics about the input data. The method stubs are given below. This assignment will give you experience with methods

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  A class is a blueprint for an object

A class is a blueprint for an object. A class may have a default constructor, a constructor with arguments, accessor methods, mutator methods, public fields, and private fields.

  Specify, design, and implement a class

Specify, design, and implement a class that can be used in a program that simulates a combination lock. The lock has a circular knob with the numbers 0 through 39 marked on the edge, and it has a three-number combination, which we will call x,y,z.

  The frantic pipe layer game

Design the Frantic Pipe Layer game

  The string class and/or the stringbuffer class in java

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

  Application for an animal-fur trimming service

Create an application for an animal-fur trimming service. Write the code for the application. Prompt the user to indicate how many animals. Display the total fee for one year. Be pleasant in your output as it will be expensive.

  Driveway is a "last-in, first-out" stack. of course

Driveway is a "last-in, first-out" stack. Of course, when a car owner retrieves a vehicle that wasn't the last one in, the cars blocking it must temporarily move to the street so that the requested vehicle can leave. Write a program in Java that m..

  Application that simulates a cash register

Implement a graphical application that simulates a cash register. Provide a text field for the item price and two buttons for adding the item to the sale, one for taxable items and one for nontaxable items. In a text area, display the register tap..

  It should have an if statement

The following are hints given: It should have an if statement. This add method determines what number greater than or less than the other number, than it adds the positive or negative. I think this should be a private method.

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