简体   繁体   English

如何在Java中解析.eml文件

[英]How to parse a .eml file in Java

I need some help. 我需要协助。 I'm working with .eml file which I want to parse but I couldn't understand certain portion of the file like this(bold one)from the term Content:Disposition I can understand it's an attachment attached in the mail. 我正在使用.eml文件进行解析,但是从术语Content:Disposition中我无法理解文件的某些部分(粗体),我可以理解它是邮件中的附件。 Could you please help me decrypt the bold part,which information does it contains. 您能帮我解密粗体部分包含的信息吗? Thanks in advance. 提前致谢。 --_007_D60D14D231DE2E479723896E22F398618F36F010INBLRDAGND3corp_ --_ 007_D60D14D231DE2E479723896E22F398618F36F010INBLRDAGND3corp_

--_007_D60D14D231DE2E479723896E22F398618F36F010INBLRDAGND3corp_ Content-Type: application/vnd.openxmlformats- officedocument.wordprocessingml.document;name="Page-Copy.docx"Content-Description: Page-Copy.docxContent-Disposition: attachment; filename="Page-Copy.docx"; size=245714;creation-date="Tue, 31 Jul 2018 06:14:01 GMT";modification-date="Tue, 31 Jul 2018 06:14:03 GMT" Content-Transfer-Encoding: base64

Please refer this image 请参考这张图片

It is simple: 很简单:

An email message might be formed in a variety of content-types: 电子邮件可能以多种内容类型形成:

  • text/plain For messages which contain olny text. 文本/纯文本用于包含纯文本的邮件。
  • text/html For messages in HTML. text / html用于HTML中的消息。
  • multipart/* For messages that contain some attachments. multipart / *用于包含某些附件的邮件。 In this case, the message contains one body for the main text and one body for each attached file, separed through a long string called boundary . 在这种情况下,该消息包含用于主文本和一个主体为每个附加的文件,通过被称为边界的长字符串separed一体。 See RFC1341 for a complete reference. 有关完整参考,请参见RFC1341

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM