Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-23-2008, 06:39 AM
Member
 
Join Date: Apr 2008
Posts: 1
DigitalBoB12 is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-23-2008, 07:39 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,545
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Did you read about JavaMail API. That's the solution for you.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-11-2008, 07:59 PM
Member
 
Join Date: May 2008
Location: SA
Posts: 4
Johnny Kewl is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-31-2008, 12:25 AM
Member
 
Join Date: Jul 2007
Posts: 14
vglass is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A Client to Send SMTP Mail Java Tip java.net 0 04-07-2008 10:06 PM
[B]Simple Client connected to server but not exchanging messages[/B] JavaEmpires Networking 3 01-07-2008 09:01 AM
Access Email usind a java mail client Access Email usind a java mail client consult4u Enterprise JavaBeans 2 07-31-2007 10:29 AM
a problem about java mail client program lunarstyle AWT / Swing 6 06-02-2007 01:43 AM
Simple example Client Server Application ferosh Networking 1 04-01-2007 12:36 PM


All times are GMT +3. The time now is 01:53 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org