读取电子邮件的文本文件转换为 Javamail MimeMessage
我有一个电子邮件原始来源的文本文件(直接从 gmail 复制,如果您单击“查看原始文件”,您就会看到它)。我想读入该文件并将其转换为 MimeMessage。
如果您好奇为什么,我设置了 JavaMaildir,并且需要用电子邮件填充它的收件箱以进行测试。我从来没有真正处理过阅读文件和所有这些,所以任何帮助将非常感谢。
I have a text file of the original source of an email(just straight copied from gmail if you click on "View Original" you'll see it). I want to read this file in and convert it into a MimeMessage.
If you are curious as to why, I have JavaMaildir set up, and need to populate it's inbox with emails for testing purposes. I've never really dealt with reading files and all this, so any help would be great thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西应该有效:
Something like this should work: