JavaGian java tutorial and java interview question and answer

JavaGian , Free Online Tutorials, JavaGian provides tutorials and interview questions of all technology like java tutorial, android, java frameworks, javascript, ajax, core java, sql, python, php, c language etc. for beginners and professionals.

Showing posts with label java_sending_email. Show all posts
Showing posts with label java_sending_email. Show all posts

java_sending_email

4:01 AM
To send an e-mail using your Java Application is simple enough but to start with you should have  JavaMail API  and  Java Activation Framework (JAF) installed on your machine. You can download latest version of  JavaMail (Version 1.2)  from Java's standard website. You can download latest version of  JAF (Version 1.1.1)  from Java's standard website. Download and unzip these files, in the newly created top level directories you will find a number of jar files for both the applications. You need to add  mail.jar  and  activation.jar  files in your CLASSPATH. Send a Simple E-mail Here is an example to send a simple e-mail from your machine. It is assumed that your  localhost  is connected to the Internet and capable enough to send an e-mail. Example // File Name SendEmail.java import java . util .*; import javax . mail .*; import javax . mail . internet .*; import javax . activation .*; public ...

.