Adjusts to use a different loading of certificates and updates the docs for it

This commit is contained in:
Trenton H
2023-08-23 07:28:36 -07:00
parent 16adddc803
commit df82ac8ac4
2 changed files with 4 additions and 4 deletions

View File

@@ -397,7 +397,7 @@ def get_mailbox(server, port, security) -> MailBox:
"""
ssl_context = ssl.create_default_context()
if settings.EMAIL_CERTIFICATE_FILE is not None: # pragma: nocover
ssl_context.load_cert_chain(certfile=settings.EMAIL_CERTIFICATE_FILE)
ssl_context.load_verify_locations(cafile=settings.EMAIL_CERTIFICATE_FILE)
if security == MailAccount.ImapSecurity.NONE:
mailbox = MailBoxUnencrypted(server, port)