用Java创建一个.eml(email)文件 [英] Create a .eml (email) file in Java
本文介绍了用Java创建一个.eml(email)文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
您可以构建 javax.mail.Message
对象(或已经从邮件服务器构建),然后可以使用 writeTo()
方法将其保存到文件。
有关详细信息,请参阅 JavaMail API 。
Anybody knows how to do this? I got all the information of the email (body, subject, from , to, cc, bcc) and need to generate an .eml file out of it.
解决方案
You can construct javax.mail.Message
object (or have it already constructed from the mail server) and then you can use writeTo()
method to save it to file.
See JavaMail API for more information.
这篇关于用Java创建一个.eml(email)文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文