Create a .eml (email) file in Java

前端 未结 5 825
不思量自难忘°
不思量自难忘° 2020-12-01 07:50

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.

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 08:48

    Looking at a typical EML file it looks like a raw dump of the text communication that went to the server. So it is a text file containing the mail headers and body. To get your attachments, different views, etc in the correct format inside the EML file you need to MIME-encode the body and its parts.

提交回复
热议问题