Added unicode account option

This commit is contained in:
M66B
2022-08-12 22:09:50 +02:00
parent d05dbf0411
commit c2b2016680
21 changed files with 2874 additions and 53 deletions

View File

@@ -168,18 +168,18 @@ public class EmailService implements AutoCloseable {
// Prevent instantiation
}
EmailService(Context context, String protocol, String realm, int encryption, boolean insecure, boolean debug) throws NoSuchProviderException {
this(context, protocol, realm, encryption, insecure, PURPOSE_USE, debug);
EmailService(Context context, String protocol, String realm, int encryption, boolean insecure, boolean unicode, boolean debug) throws NoSuchProviderException {
this(context, protocol, realm, encryption, insecure, unicode, PURPOSE_USE, debug);
}
EmailService(Context context, String protocol, String realm, int encryption, boolean insecure, int purpose, boolean debug) throws NoSuchProviderException {
EmailService(Context context, String protocol, String realm, int encryption, boolean insecure, boolean unicode, int purpose, boolean debug) throws NoSuchProviderException {
this.context = context.getApplicationContext();
this.protocol = protocol;
this.insecure = insecure;
this.purpose = purpose;
this.debug = debug;
properties = MessageHelper.getSessionProperties();
properties = MessageHelper.getSessionProperties(unicode);
long now = new Date().getTime();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
@@ -324,10 +324,6 @@ public class EmailService implements AutoCloseable {
properties.put("mail." + protocol + ".rsetbeforequit", Boolean.toString(keep));
}
void setUnicode(boolean value) {
properties.put("mail.mime.allowutf8", Boolean.toString(value));
}
void set8BitMime(boolean value) {
// https://datatracker.ietf.org/doc/html/rfc6532
properties.put("mail." + protocol + ".allow8bitmime", Boolean.toString(value));