1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Use InetAddress.getCanonicalHostName() instead of getHostName()

This should always return a FQDN.
This commit is contained in:
cketti 2011-05-19 00:55:34 +02:00
parent 2311e688f0
commit 2d7fad1fa9

View File

@ -171,7 +171,7 @@ public class SmtpTransport extends Transport {
executeSimpleCommand(null);
InetAddress localAddress = mSocket.getLocalAddress();
String localHost = localAddress.getHostName();
String localHost = localAddress.getCanonicalHostName();
String ipAddr = localAddress.getHostAddress();
if (localHost.equals("") || localHost.equals(ipAddr) || localHost.contains("_")) {