Click here to Skip to main content
13,632,371 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
I have a mail server and trying to connect to it using pop3 from console application.
but getting exception .. no Such host found.
when i Hit the mail server url manually and login , i am able to login successfully.
please advice.

What I have tried:

using (Pop3 pop3 = new Pop3())
           {
               try
               {
                   pop3.Connect("mail.cloud.xyz.com");  // or ConnectSSL for SSL
                   pop3.UseBestLogin("mailadmin@cloud.xyz.com", "XYZ");
               }
               catch (Exception ex)
               {
                   var mss = ex;
               }// or

           }
Posted 15-Apr-18 23:39pm
Updated 16-Apr-18 0:00am
Comments
F-ES Sitecore 16-Apr-18 5:43am
   
The error is pretty clear, there is probably some network issue preventing the server from resolving the host name. Contact whoever administers the IIS server, or see if using the IP address rather than the host name works.
ashu1810 16-Apr-18 6:27am
   
Thank you for the reply.. I tried with IP address too but its not working.

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

"No such host found" means that the server name could not be resolved (the corresponding IP address could not be determined) by any of the name lookup methods (DNS, hosts file).

The most common reason is a typo. So check your server name or use copy & paste. To check name resolving you can open a command prompt window and use
nslookup mail.cloud.xyz.com

If it still does not work it might be a problem of the used library. If that is the commercial LimiLabs library (which seems to be case according to the posted code), you might ask at their forum: Limilabs Q&A[^].
  Permalink  
Comments
ashu1810 16-Apr-18 6:32am
   
Thank you for reply.. checked with the command prompt,able to see the server details. I think its the problem with the Limilabs library.
Jochen Arndt 16-Apr-18 6:56am
   
That is the drawback of such closed source libraries: You can't check what is does.

I did not even found a documentation about the provided methods with a quick web research. If there is an overload for the Connect() method accepting an IP address (as string or IPAddress class), you can try that using the address from the nslookup output.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.180712.1 | Last Updated 16 Apr 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100