mirror of https://github.com/M66B/FairEmail.git
parent
823b13016a
commit
36fa2bad9d
|
@ -23,7 +23,6 @@ import java.net.Inet6Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.security.GeneralSecurityException;
|
import java.security.GeneralSecurityException;
|
||||||
import java.security.KeyStore;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.cert.Certificate;
|
import java.security.cert.Certificate;
|
||||||
import java.security.cert.CertificateEncodingException;
|
import java.security.cert.CertificateEncodingException;
|
||||||
|
@ -49,7 +48,6 @@ import javax.mail.Session;
|
||||||
import javax.mail.Store;
|
import javax.mail.Store;
|
||||||
import javax.mail.event.StoreListener;
|
import javax.mail.event.StoreListener;
|
||||||
import javax.net.ssl.SSLSocket;
|
import javax.net.ssl.SSLSocket;
|
||||||
import javax.net.ssl.TrustManagerFactory;
|
|
||||||
|
|
||||||
public class MailService implements AutoCloseable {
|
public class MailService implements AutoCloseable {
|
||||||
private Context context;
|
private Context context;
|
||||||
|
@ -131,10 +129,6 @@ public class MailService implements AutoCloseable {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
|
|
||||||
tmf.init((KeyStore) null);
|
|
||||||
sf.setTrustManagers(tmf.getTrustManagers());
|
|
||||||
|
|
||||||
properties.put("mail." + protocol + ".ssl.socketFactory", sf);
|
properties.put("mail." + protocol + ".ssl.socketFactory", sf);
|
||||||
properties.put("mail." + protocol + ".socketFactory.fallback", "false");
|
properties.put("mail." + protocol + ".socketFactory.fallback", "false");
|
||||||
} catch (GeneralSecurityException ex) {
|
} catch (GeneralSecurityException ex) {
|
||||||
|
|
Loading…
Reference in New Issue