Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: objects of sent emails

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default objects of sent emails

    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.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,085
    My Mood
    Mellow
    Thanks
    184
    Thanked 653 Times in 640 Posts

    Default Re: objects of sent emails

    For your first question, how to show sent emails, I would have an Email class that contains all of the necessary attributes of an email required by the assignment. Then, when an email is sent, it would have a field or attribute to indicate that it has been sent and is no longer a draft or unsent email. To show sent emails, the existing Email instances would be iterated and those that have been sent would be displayed.

    For the CC/BCC question, when emails are received, the client that receives and displays them shows the cc: addresses but does not show the bcc: addresses. The same behavior is true for the bcc: clients.

Similar Threads

  1. Need some different approch on sending emails through java
    By mkhilate in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 3rd, 2013, 02:55 AM
  2. Java sound functions + emails
    By deanbyrne95 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: March 26th, 2013, 07:44 AM
  3. How to Send emails from Google Mail using JavaMail API
    By JavaPF in forum Java SE API Tutorials
    Replies: 3
    Last Post: February 26th, 2012, 03:21 PM
  4. receiving emails through spring
    By the light in forum Web Frameworks
    Replies: 0
    Last Post: October 18th, 2011, 01:55 AM
  5. How to Send emails from Google Mail using JavaMail API
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 1
    Last Post: November 14th, 2010, 10:00 AM

Tags for this Thread