diff --git a/app/src/main/java/com/sun/mail/iap/Protocol.java b/app/src/main/java/com/sun/mail/iap/Protocol.java index afb077b218..dfe61c1149 100644 --- a/app/src/main/java/com/sun/mail/iap/Protocol.java +++ b/app/src/main/java/com/sun/mail/iap/Protocol.java @@ -16,6 +16,8 @@ package com.sun.mail.iap; +import android.text.TextUtils; + import java.util.Properties; import java.io.*; import java.nio.channels.SocketChannel; @@ -680,6 +682,8 @@ protected synchronized String getLocalHost() { localHostName = "[" + localHost.getHostAddress() + "]"; } } + if (TextUtils.isEmpty(localHostName)) + localHostName = "localhost"; return localHostName; }