PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
17.47k stars 1.64k forks source link

Add support for custom SSLContext in EmailServerCredentials #13094

Open drfraser opened 2 years ago

drfraser commented 2 years ago

I am trying to use my personal mail server but it has a self-signed certificate. So I am getting

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1131)

when trying to send mail using email_send_message(). A few simple changes to EmailServerCredentials to support an optional context parameter would do the trick. Since I need this, I volunteer to make the changes, provide a PR etc. I'm sure support for a custom sslcontext might be needed by someone else at some point...

ahuang11 commented 2 years ago

Thanks! Looking forward to the PR.