Solved

Java Email

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

930 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now