|
|
@ -34,6 +34,7 @@ import java.io.FileReader;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.OutputStream;
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.nio.charset.Charset;
|
|
|
|
import java.nio.charset.Charset;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
@ -475,7 +476,22 @@ public class MessageHelper {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
header = new String(header.getBytes(StandardCharsets.ISO_8859_1));
|
|
|
|
header = new String(header.getBytes(StandardCharsets.ISO_8859_1));
|
|
|
|
return InternetAddress.parseHeader(header, false);
|
|
|
|
Address[] addresses = InternetAddress.parseHeader(header, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Address address : addresses) {
|
|
|
|
|
|
|
|
InternetAddress iaddress = (InternetAddress) address;
|
|
|
|
|
|
|
|
iaddress.setAddress(decodeMime(iaddress.getAddress()));
|
|
|
|
|
|
|
|
String personal = iaddress.getPersonal();
|
|
|
|
|
|
|
|
if (personal != null) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
iaddress.setPersonal(decodeMime(personal));
|
|
|
|
|
|
|
|
} catch (UnsupportedEncodingException ex) {
|
|
|
|
|
|
|
|
Log.w(ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return addresses;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Address[] getFrom() throws MessagingException {
|
|
|
|
Address[] getFrom() throws MessagingException {
|
|
|
|