From 41e6a701953c6f3ec0c4b2375426e4205a1c6a00 Mon Sep 17 00:00:00 2001 From: william Date: Thu, 2 Mar 2017 14:06:22 +0800 Subject: [PATCH] encoded email's sender name with utf-8. --- src/main/java/com/gitblit/service/MailService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/service/MailService.java b/src/main/java/com/gitblit/service/MailService.java index 58acc9c0..a5cd46d4 100644 --- a/src/main/java/com/gitblit/service/MailService.java +++ b/src/main/java/com/gitblit/service/MailService.java @@ -145,7 +145,7 @@ public class MailService implements Runnable { if (StringUtils.isEmpty(fromAddress)) { fromAddress = "gitblit@gitblit.com"; } - InternetAddress from = new InternetAddress(fromAddress, mailing.from == null ? "Gitblit" : mailing.from); + InternetAddress from = new InternetAddress(fromAddress, mailing.from == null ? "Gitblit" : mailing.from,"utf-8"); message.setFrom(from); Pattern validEmail = Pattern -- 2.39.5