I want to make a simple program where you can send email from the Command Line. I found this tutorial, ' http://www.tutorialspoint.com/java/java_sending_email.htm ', however the downloads don't. So where can I get JavaMail API and Java Activation Framework (JAF) and how would i put it in my class path.
Basically Im looking for someone to break it down and show me how I could make an email program.
Im using Eclipse luna.
Do have a look at this example. This example, simply sends one attachment as a mail. The contents of attachment
quiz.txt
are as follows:Here is the
SendMailExample.java
file:You simply needed this mail.jar file.
To compile, simply write (
mail.jar
is present at C:\install\java\mail\mail.jar` location ):To run, write:
java -classpath .;C:\install\java\mail\mail.jar SendMailExample
THis will do :-)
Take a look at this library Commons Email it will simplify your task