Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3862

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

$
0
0

Hello,

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");


        smtp.Send(message);

What am I doing wrong?

Thank you for your appreciated help.


Viewing all articles
Browse latest Browse all 3862

Trending Articles