can any one give me some sample code on how to generate a mail if value exceeds thrsold
Question
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
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow