# Reply by email SSL self signed certificate error

**URL:** <https://meta.discourse.org/t/reply-by-email-ssl-self-signed-certificate-error/30868>\
**Category:** Support\
**Created:** [7 Luglio 2015, 6:40pm UTC](https://meta.discourse.org/t/reply-by-email-ssl-self-signed-certificate-error/30868 "2015-07-07T18:40:39Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [11 Agosto 2015, 11:16pm UTC](https://meta.discourse.org/t/reply-by-email-ssl-self-signed-certificate-error/30868/20 "2015-08-11T23:16:57Z")

</div>

Ok I think I’ve found the solution @downey @riking @codinghorror🙂

Just need to add a site setting `pop3 polling ssl verify none`

Then update [this code](https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/poll_mailbox.rb):

from:

```plaintext
    def poll_pop3
      connection = Net::POP3.new(SiteSetting.pop3_polling_host, SiteSetting.pop3_polling_port)
      connection.enable_ssl if SiteSetting.pop3_polling_ssl

      connection.start(SiteSetting.pop3_polling_username, SiteSetting.pop3_polling_password) do |pop|
        unless pop.mails.empty?
          pop.each do |mail|
            handle_mail(mail)
          end
        end
        pop.finish
      end
    rescue Net::POPAuthenticationError => e
      Discourse.handle_job_exception(e, error_context(@args, "Signing in to poll incoming email"))
    end

```

to:

```plaintext
    def poll_pop3
      connection = Net::POP3.new(SiteSetting.pop3_polling_host, SiteSetting.pop3_polling_port)
      if SiteSetting.pop3_polling_ssl
        if SiteSetting.pop3_polling_ssl_verify_none
          connection.enable_ssl(OpenSSL::SSL::VERIFY_NONE)
        else
          connection.enable_ssl
        end 
      end
        
      connection.start(SiteSetting.pop3_polling_username, SiteSetting.pop3_polling_password) do |pop|
        unless pop.mails.empty?
          pop.each do |mail|
            handle_mail(mail)
          end
        end
        pop.finish
      end
    rescue Net::POPAuthenticationError => e
      Discourse.handle_job_exception(e, error_context(@args, "Signing in to poll incoming email"))
    end

```

If this is ok, and if someone can point me in the right direction of how to add the site setting I can send a PR (but quite happy for one of you guys to do it instead as that’d be quicker.)

---

_[View the full topic](https://meta.discourse.org/t/reply-by-email-ssl-self-signed-certificate-error/30868)._
