|
[Exercise | API Docs | Short Course| Exercises] Help is available for each task. Task 1The skeleton code already includes the code to get the list of messages from the folder and prompt you to create a reply. Task 2When answered affirmitively, create a new MimeMessage reply = (MimeMessage)message[i].reply(false); Task 3Set the from field to your email address. Task 4Create the text for the reply. Include a canned message to start. When the original message is plain text, add each line of the original message, prefix each line with the " mimeMessage.isMimeType("text/plain").
Task 5Set the message's content, once the message content is fully determined. Task 6Send the message. Task 7Compile and run the program, passing your mail server, SMTP server, username, password, and from address on the command line. Answer YES to the messages you want to send replies. Just hit
java ReplyExample POP.Server SMTP.Server username password from@address
Task 8Check to make sure you received the message with your normal mail reader (Eudora, Outlook Express, pine, ...). Copyright 1996-2001 jGuru.com. All Rights Reserved. | |||||||
|
| ||||||||||||