wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes JAVA MAIL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "JAVA MAIL" Watch "JAVA MAIL" New topic
Author

JAVA MAIL

Trader Joey
Ranch Hand

Joined: May 11, 2000
Posts: 33
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

Joined: Jan 07, 1999
Posts: 6920
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.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Duane White
Greenhorn

Joined: Aug 29, 2003
Posts: 1
How would you use this same process and format the email mesage in html format?
Thanks.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Sounds to me like you could use this.
Might save you some time.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA MAIL
 
Similar Threads
How to mail
error sending email to hotmail account
which smtp server
java mail doubt
Active Mq