1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-02 00:25:10 -04:00

Prefix IPv6-addresses with "IPV6:" in EHLO command.

Fixes issue 1708
This commit is contained in:
cketti 2010-06-03 01:00:24 +00:00
parent 3812c75f66
commit 576078e778

View File

@ -183,9 +183,16 @@ public class SmtpTransport extends Transport
if (localHost.equals(localAddress.getHostAddress()))
{
// IP was returned
// We don't have a FQDN, so use IP address.
if (localAddress instanceof Inet6Address)
{
localHost = "[IPV6:" + localHost + "]";
}
else
{
localHost = "[" + localHost + "]";
}
}
List<String> results = executeSimpleCommand("EHLO " + localHost);