I'm creating a program that sends emails to SMTP as an assignment using Java.
my program consists of two classes 1- GUI class (which has all gui components and getters of this components like email from, to, subject,cc,bcc and message body)
2- Message class which is called when send button get pressed, this class checks entries and makes socket connection.
Message class is actionListener of send buttion in GUI class. in actionPerformed method it calls checking method, if all valid socket method will be called and send the emails
now I have (sent) button, which should display all sent emails
how to do so?
arraylist of object? or what?
like, is it a method inside Message class that making a format of email
like:
public void sentEmails(){
String to = "To: " + gui.getrRcptAddr();
String CC ="CC: "+gui.getCcAdd();
//etc..
}
and how to create object from this method, remember this will be display when (sent) button pressed
===============
in my assignment there two vague points:
-The CC/BCC field shows email address(es) while sending and an email is received at the address shown in the CC/BCC field but BCC value is not shown in the received mail
-The received mail shows carbon copy addresses
what I have done so far for these two points.. only check if they are not empty fields, I get addresses and send them to the server using "RCPT TO: "+ gui.getCcAddr
when I receive the emil, sure nothing about cc or bcc, do u have any explanation how to get around this?
I would appreciate any hint....Thank you guys.