hi i am monitoring jvm and i am getting it statics like memory,number of threads etc and i want to generate mail notification depending on that conditions. can any give me some sample code on how to generate mails
views:
40answers:
1
A:
The JavaMail download contains examples for how to use the javax.mail API:
http://java.sun.com/products/javamail/FAQ.html#examples
Look at the demo folder in the javamail-1.4.2.zip
Another approach would be to use log4j or another logging framework that supports an "Smtp/Email" appender. See the log4j site for examples on how to setup email logging.
Andy White
2009-04-29 05:52:02