如何打开电子邮件客户端并自动在java中附加文件 [英] How to open an email client and automatically attach file in java

查看:171
本文介绍了如何打开电子邮件客户端并自动在java中附加文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Java:启动带附件的邮件客户端?

我需要创建一个java代码,它将打开一个电子邮件客户端(Outlook,Outlook Express等)并自动附加一个文件。我尝试使用mailto但它只打开邮件客户端而不附加文件。请帮忙。

I need to create a java code that will open an email client (Outlook, outlook express , etc) and automatically attach a file in it. I tried using mailto but it only opens the mail client and do not attach the file. Help please.

非常感谢。

推荐答案

JDIC 提供了一些功能来执行此操作。尽管JDIC的大部分内容都被Java 6中的 java.awt.Desktop 所吸收,但它并未包含电子邮件撰写位。不幸的是,JDIC二进制文件随着而消失了。 java.net过渡到Kenai平台;我上传了我能找到的最新版本 JIRA

JDIC provides some functionality to do this. Although much of JDIC was absorbed into java.awt.Desktop in Java 6, it didn't include the email composition bits. Unfortunately the JDIC binaries disappeared with the transition of java.net to the Kenai platform; I uploaded the most recent versions I could find to the project JIRA.

JDIC在OSGi中不能很好地运行,因此我最近将相关的MAPI位提取到一个名为 jmapi

JDIC doesn't play well in OSGi, so I recently extracted the relevant MAPI bits into a bundle called jmapi.

这篇关于如何打开电子邮件客户端并自动在java中附加文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆