Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAVA MAIL

 
Trader Joey
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell me the requirements for running a sample javamail program to send a mail thru an application ? Can i send a mail thru my application using my hotmail smtp server ot any other smtp server ?
thanks
Nikhil
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These days, the recommended way is to use the JavaMail API.
It's a bit fiddly to set up (you have to add two new jar files
to your classpath) but once installed, it works really well.
1. Get JavaMail ("mail.jar") and the Java Activation Framework("activation.jar") from http://java.sun.com/products/javamail/
2. Add these two jar files to your classpath (this may be as easy as adding them to the jre/lib/ext directory in Java 2).
3. Add the following class to your project as "Mailer.java":

4. Examine it, modify it, play with it, have fun.
 
Duane White
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you use this same process and format the email mesage in html format?
Thanks.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds to me like you could use this.
Might save you some time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic