Search This Blog

Saturday, February 6, 2010

Create Mail Client

in this post, mail client created using Java mail library. Java mail is a special library for email applications that can be downloaded for free at www.sun.com.
To make the email client required an order to be able to access SMTP, POP3, and IMAP. SMTP is a protocol to be able to send email. While POP3 and IMAP are protocols to be able to download email messages from the Mail Server.
To send a message use the following command:



In the above listing can be seen that done by sending an email calling new Mime Message class in Java Mail library. Object of the class to fill the properties of data such as email subject, email messages, and Date. Then the object of Mime Message sent by calling the transport method.
Meanwhile, to download the messages to look the this listing as follows:


Meanwhile, to connect to the Mail Client is as follows:



Described in the above listing that the input in order to connect to the Mail Server, in the pages that have been in connection input of the user, the insert into the String Buffer. Then the connection is done by making Store object and then the object is to connect with the save and send the session that contains the properties to the port SMTP authentication, POP3, IMAP and.


2 comments:

Nanang said...

Mas, Ga buat program db sederhana java netbeans - ms. access??

Icank said...

oh..bisa...ntar tak post ya...thanks udah mampir...

Calendar