Always specify charset for email addresses

This commit is contained in:
M66B
2020-07-10 10:07:53 +02:00
parent 900348b9d8
commit af45824fd8
6 changed files with 14 additions and 10 deletions

View File

@@ -39,6 +39,7 @@ import org.json.JSONObject;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -420,7 +421,7 @@ public class EntityRule {
if (answer == null)
throw new IllegalArgumentException("Rule answer not found name=" + name);
Address[] from = new InternetAddress[]{new InternetAddress(identity.email, identity.name)};
Address[] from = new InternetAddress[]{new InternetAddress(identity.email, identity.name, StandardCharsets.UTF_8.name())};
// Prevent loop
List<EntityMessage> messages = db.message().getMessagesByThread(