Would it be possible to extend the existing Connection::configure_host to allow a CA certificate file to be specified?
The extra code looks like this:
if self.mail.use_tls:
**# Change to support CA certificate authentication
cafile = current_app.config.get("MAIL_CAFILE")
context = ssl.create_default_context(cafile=cafile)**
host.starttls(**context=context**)