java desktop mailto,mailto在Java?
I am trying to set a hyperlink in my eclipse java project.
when someone clicks on a button, it should open up an email client along with the given
email id. is it possible to implement it with java.awt.Desktop?
解決方案
Yes it is possible using desktop.mail()
Desktop desktop = Desktop.getDesktop();
String message = "mailto:dummy@domain.com?subject=First%20Email";
URI uri = URI.create(message);
desktop.mail(uri);
and regarding the mailto URI you have to create it yourself.
A mailto: URI can specify message fields including "to", "cc",
"subject", "body", etc. See The mailto URL scheme (RFC 2368) for the
mailto: URI specification details.
總結(jié)
以上是生活随笔為你收集整理的java desktop mailto,mailto在Java?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android显示矩阵大小,关于andr
- 下一篇: oracle 正则表达式匹配日期格式,利