Refactoring

This commit is contained in:
M66B
2019-01-07 20:15:09 +00:00
parent 28bec6e592
commit a4bd27c3e8
3 changed files with 11 additions and 6 deletions

View File

@@ -559,10 +559,11 @@ public class FragmentIdentity extends FragmentEx {
// Check SMTP server
if (check) {
String transportType = (starttls ? "smtp" : "smtps");
Properties props = MessageHelper.getSessionProperties(auth_type, insecure);
Session isession = Session.getInstance(props, null);
isession.setDebug(true);
Transport itransport = isession.getTransport(starttls ? "smtp" : "smtps");
Transport itransport = isession.getTransport(transportType);
try {
try {
itransport.connect(host, Integer.parseInt(port), user, password);