任何人都可以给我一些示例代码,说明如何在值超过 thrsold 时生成邮件

发布于 2024-07-18 08:42:48 字数 78 浏览 4 评论 0原文

你好,我正在监视 jvm,我正在获取它的静态信息,例如内存、线程数等 我想根据该条件生成邮件通知。 能给我一些关于如何生成邮件的示例代码吗

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮世清欢 2024-07-25 08:42:48

JavaMail 下载包含如何使用 javax.mail API 的示例:

http:// /java.sun.com/products/javamail/FAQ.html#examples

查看 javamail-1.4.2.zip 中的演示文件夹

另一种方法是使用 log4j 或其他支持“Smtp”的日志记录框架/电子邮件”附加程序。 有关如何设置电子邮件日志记录的示例,请参阅 log4j 站点。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文