This commit is contained in:
M66B
2021-06-05 13:45:28 +02:00
parent 69da73f541
commit e3b053e260
2 changed files with 0 additions and 68 deletions

View File

@@ -1203,28 +1203,6 @@ public class MessageHelper {
return result;
}
String getReceivedFromHost() throws MessagingException {
ensureHeaders();
String[] received = imessage.getHeader("Received");
if (received == null || received.length == 0)
return null;
String origin = MimeUtility.unfold(received[received.length - 1]);
String[] h = origin.split("\\s+");
if (h.length > 1 && h[0].equalsIgnoreCase("from")) {
String host = h[1];
int s = origin.indexOf('[');
int e = origin.indexOf(']');
if (s > 0 && e > s + 1)
host = origin.substring(s + 1, e);
return host;
}
return null;
}
private String fixEncoding(String name, String header) {
if (header.trim().startsWith("=?"))
return header;