MailAccount增加自定义参数支持

This commit is contained in:
Looly
2024-08-08 13:16:37 +08:00
parent a05fb1a000
commit 74ee2c7425
2 changed files with 8 additions and 0 deletions

View File

@@ -156,6 +156,13 @@ public class MailAccount implements Serializable {
*/
public MailAccount(Setting setting) {
setting.toBean(this);
// since 5.8.30, custom property
setting.forEach((key, value) -> {
if (StrUtil.startWith(key, "mail.")) {
this.setCustomProperty(key, value);
}
});
}
// -------------------------------------------------------------- Constructor end