Results 1 to 4 of 4
  1. #1
    DigitalBoB12 is offline Member
    Join Date
    Apr 2008
    Posts
    1
    Rep Power
    0

    Default Simple Java Mail Client

    Hello Java community. I am taking an intro to java course and have run into a bunch of trouble towards the end. Our teacher has barely taught us anything about networking, or anything else for that matter lol, but he wants us to work on creating a java mail client. My friends and I have been working for sometime on this but have not gotten very far. We have searched online, through our textbook, and spoke to others and still are having trouble. I was wondering if you could give us any help. We also have not been taught on netbeans much, which he popped out of nowhere last class and said we had to use for a graphic interface. here is the hw question:

    Design a mail client which will allow us to send one message while detecting any error that may occur during the process and telling the user. The screen shoudl have fields for SMTP server, Sender's email address, recipient's email address, and a text area for the body of the message.

    SMTP usually uses port 25 for mail. You may provide an input box to override this default, though it's not necessary.

    A transcript of a normal session is below:
    220 duke.poly.edu ESMTP Sendmail 8.13.1/8.13.1; Wed, 16 Apr 2008 20:25:59 -0400 (EDT)
    HELO dkatz
    250 duke.poly.edu Hello dkatz@localhost [127.0.0.1], pleased to meet you
    mail from:<dkatz@duke.poly.edu>
    250 2.1.0 <dkatz@duke.poly.edu>... Sender ok
    rcpt to:<dkatz@poly.edu>
    250 2.1.5 <dkatz@poly.edu>... Recipient ok
    data
    354 Enter mail, end with "." on a line by itself
    Subject: This is a test message

    Test
    .
    250 2.0.0 m3H0PxPp025632 Message accepted for delivery

    You can try this yourself, by executing "telnet (mailserver) 25" in a command window.

    -Any help would be much appreciated. Snippets of code, advice, or even the whole thing would be very helpful so that i can sort of "reverse engineer" it and see what has been done as i am very lost.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    Johnny Kewl is offline Member
    Join Date
    May 2008
    Location
    SA
    Posts
    4
    Rep Power
    0

    Default

    You just got lucky... go here and steal that code... dont worry about the server, just take that code and get it compiled
    Mailer
    Its not perfect but it does what you need.
    As Eranga said its Javamail, but what you learning.. ie the smtp protocol is also a good thing, thats whats happening underneath Javamail... and Eranga, I got to tell you, if thats you, I think I'm in love ;)

  4. #4
    vglass is offline Member
    Join Date
    Jul 2007
    Posts
    14
    Rep Power
    0

    Default

    The SMTP protocol for sending a message is pretty simple. You could use the JavaMail framework or just do a Google search for "Java SMTP". Plenty of results available.

    Either way, to really understand you should look at RFC 821 which describes the protocol.

Similar Threads

  1. a problem about java mail client program
    By lunarstyle in forum AWT / Swing
    Replies: 9
    Last Post: 12-19-2009, 04:14 PM
  2. A Client to Send SMTP Mail
    By Java Tip in forum java.net
    Replies: 0
    Last Post: 04-07-2008, 08:06 PM
  3. Replies: 3
    Last Post: 01-07-2008, 07:01 AM
  4. Access Email usind a java mail client Access Email usind a java mail client
    By consult4u in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-31-2007, 08:29 AM
  5. Simple example Client Server Application
    By ferosh in forum Networking
    Replies: 1
    Last Post: 04-01-2007, 10:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •