首页 > 解决方案 > javamail 抛出 javax.activation.UnsupportedDataTypeException: text/related; 字符集=UTF-8

问题描述

我正在尝试从专有存档格式创建 EML(使用 javamail)。我收到以下错误:

“javax.activation.UnsupportedDataTypeException:文本/相关;charset=UTF-8”

我在 RFC 中进行了搜索,但无法确定这是否违反。源电子邮件内容具有下面提到的边界参数。

Content-Type: multipart/related; 
boundary=_861f0215-a7a4-4ec2-84ea-56b5552629ae_; type="text/html"
Content-Transfer-Encoding: base64

如果我用 Content-Type: text/html 替换整个 Content-Type,那么它可以工作。

标签: jakarta-mail

解决方案


推荐阅读