Solved

Java Email

Posted on 1998-06-29
3
200 Views
Last Modified: 2013-11-24
We have Java Email specification?
There is no tutorial for Java email? how to implement Email service in Java.?
0
Comment
Question by:geostp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
gadio earned 50 total points
ID: 1224122
geostp, if you want the complete srevices of pop3 protocol, you had better download one of the many free pop3 packages that are on the net. For example try: http://members.tripod.com/~mpandit/POP3download.html
If however all you want to do is send email using java, you may want to use the SMTP protocol. You can implement the protocol yourself (if you need more information ask), and you can use internal java classes. These classes are not documented but they work ok. Here is the info for using the internal class (use import) sun.net.smtp.SmtpClient :
public synchronized class SmtpClient extends TransferProtocolClient
{
    String mailhost;
    SmtpPrintStream message;
    public SmtpClient()
    public SmtpClient(String string)
    public void closeServer()
    public void from(String string)
    public String getMailHost()
    public PrintStream startMessage()
    public void to(String string)
}

Use the constructor with the url of the mail server. fill the from and the to (through the functions), use the startMessage to get a printstream, to which you write the mail, and finally use the closeServer() to send.
Good luck,
G.
0
 
LVL 6

Expert Comment

by:gadio
ID: 1224123
If you need more info feel free to ask.
0
 

Expert Comment

by:jorgenlindell
ID: 1224124
smtp and POP3 classes are free at my hompage at lgr.se
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question