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.