Mail.buildContent改进,正文部分总在最前(issue#4072@Github)

This commit is contained in:
Looly 2025-09-13 16:33:31 +08:00
parent 905fcbdfac
commit 172bbff73e
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# 🚀Changelog
-------------------------------------------------------------------------------------------------------------
# 5.8.41(2025-09-11)
# 5.8.41(2025-09-13)
### 🐣新特性
* 【core 】 增加`WeakKeyValueConcurrentMap`及其关联类,同时废弃`WeakConcurrentMap`并替换issue#4039@Github
@ -15,6 +15,7 @@
* 【extra 】 `RedisDS`增加`getPool``getSetting`方法issue#ICVWDI@Gitee
* 【core 】 `NumberUtil.pow`增加重载支持指数自定义保留位数pr#4052@Github
* 【core 】 `NumberUtil.isPrimes`优化判断pr#4058@Github
* 【extra 】 `Mail.buildContent`改进正文部分总在最前issue#4072@Github
### 🐞Bug修复
* 【core 】 修复`ReflectUtil`中因class和Method关联导致的缓存无法回收问题issue#4039@Github

View File

@ -465,7 +465,7 @@ public class Mail implements Builder<MimeMessage> {
// 正文
final MimeBodyPart body = new MimeBodyPart();
body.setContent(content, StrUtil.format("text/{}; charset={}", isHtml ? "html" : "plain", charsetStr));
this.multipart.addBodyPart(body);
this.multipart.addBodyPart(body, 0);
return this.multipart;
}