"Unable to resolve hostname" error when try to connect to gmx via proxy

0 votes
asked Jan 19, 2018 by makromedia (190 points)


tried to connect to mail.gmx.net using a HTTP(Connect)-Proxy for sending an email and get the error "Unable to resolve hostname"

Here is my source-code:

        MailMessage message = new MailMessage();

        message.From = "xxx@gmx.net";
        message.To = "123@gmail.com";
        message.Subject = "This is a test message";
        message.BodyText = "Hello, Joe!";
        message.BodyHtml = "Hello, <b>Joe</b>!";

        Smtp smtp = new Smtp();

        smtp.Proxy.ProxyType = ProxyType.HttpConnect;
        smtp.Proxy.Host = "myproxy";

        smtp.Proxy.Port = 80;
        smtp.Proxy.UserName = "user";
        smtp.Proxy.Password = "pass";

        smtp.Connect("mail.gmx.net", SslMode.Explicit);
        smtp.Login("xxx@gmx.net", "password");


What am I doing wrong?

Thank you for your appreciated help.

commented Jan 19, 2018 by Lukas Pokorny (126,910 points)
This looks like the proxy is unreachable. However, to make sure, please create a log using Smtp object's LogWriter property (as described at https://rebex.net/kb/logging/) and either post it here or mail it to support@rebex.net. This should make it possible to tell what is going on.

1 Answer

0 votes
answered Jan 20, 2018 by makromedia (190 points)

Thank you for your fast response.

I found out that the error was caused by the "proxy-issue" introduced in version 2017 R5, that was fixed with the R6 version ("Proxy: Fixed handling of IP-based host names in proxy name resolving routine (an issue introduced in previous release").
So I just updated to the latest version and now it works fine.

commented Jan 22, 2018 by Lukas Pokorny (126,910 points)
Thanks for letting us know, and sorry for inconvenience!