Solved

Java Email

Posted on 1998-06-29
3
195 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
  • 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

830 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