Write a console application in Java that sends a user
selected text file by email. The application should read its
configuration from a file called email.cfg and ask
the user for the name of the file to send and an email address
where to send that file. It should write whether the file was
sent, or there were some problems. (More specific error message
than "There is something wrong, I cannot send email" is
desirable.)
The configuration files should have the following format: the first line - the SMTP server location, the second line - the return email address, the third line - the user's name. If the file cannot be read, the program should stop with an appropriate error message.
In case the user selected file cannot be open for reading or does not exist, ask the user to reenter the file name again. Quit asking only when a valid file is provided, or if an empty name is given. In the second case, quit the program.
The file to be sent may contain a line that has just a single period in it. To prevent early termination of sending email by sending such a line please prepend "> " to that period.
Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of dynamic Web pages (JavaScript or CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e- mail to the instructor at olekmali at cegt201.bradley.edu. Please set the message subject to: web-hw5.
Thank you.