Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3405106
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:27:53+00:00 2026-05-18T05:27:53+00:00

I am using OpenPOP I am trying to retrieve mail from an in office

  • 0

I am using OpenPOP
I am trying to retrieve mail from an in office exchange server. This is my code

 popClient.Connect(host.Host, (int)host.Port, (bool)host.Ssl);
 popClient.Authenticate(host.Username, host.Password);

Prodlem is the SSL Certificate is created in iis 7 and isnt a valid certificate is there any way for my to bypass this.

It gives me the error remote certificate is invalid according to the validation procedure.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:27:54+00:00Added an answer on May 18, 2026 at 5:27 am

    Yes, there is a way. It requires some small code changes is the POPClient class.

    Step 1: Replace the constructor for the SslStream instance that is used to authenticate the server with one that allows you to provide a delegate for validating the certificate supplied by the remote party. Therefore replace

    SslStream stream = new SslStream(clientSocket.GetStream(), false); 
    

    from POPClient class, Connect method with

    SslStream stream = new SslStream(clientSocket.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null);
    

    Step 2: Provide the method that is called by the delegate and force the validation of the remote certificate by returning always true:

    public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
    {         
        return true;  // force the validation of any certificate
    }
    

    For further details on this subject, please check the documentation available on msdn.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using open source component to retrieve emails from my mail server using vb.net
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using emacs on Ubuntu 11.10. I want to connect to a SQL Server database
I am using OpenPop.net to try and parse our links from all the emails
I am using OpenPop.Net to connect to a GoDaddy hosted email account in a
Using the NSXMLParser i can retrieve the data from the local XML file, but
Using MonoTouch, I'm trying to make a custom view, so I can reuse this
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using SQL Server 2008 R2 we are looking for a way to select the
Using CI for the first time and i'm smashing my head with this seemingly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.