Hi Team - In Blocks - Email Server Credentials. W...
# ask-community
c
Hi Team - In Blocks - Email Server Credentials. What needs to be put into the Smtp Type and smtp server for office 365?
1
a
Hey @Chris Gunderson! There is currently an issue with configuring the Email Server Credentials block via the UI. You can find more details in this GitHub issue. We’re hoping to resolve this issue soon and you’ll see updates in GitHub as we work on it.
c
Thanks Alex.
Hey @alex! I noticed https://github.com/PrefectHQ/prefect/pull/6818 was corrected. What are the proper variables for SMTP Type and Server?
170912.547 | INFO | prefect.engine - Created flow run 'khaki-narwhal' for flow 'Fidelity Allocations' 170918.532 | INFO | Flow run 'khaki-narwhal' - Created task run 'email_send_message-8f021083-0' for task 'email_send_message' 170918.535 | INFO | Flow run 'khaki-narwhal' - Executing 'email_send_message-8f021083-0' immediately... 170918.953 | ERROR | Task run 'email_send_message-8f021083-0' - Encountered exception during execution: Traceback (most recent call last): File "/opt/pysetup/.venv/lib/python3.9/site-packages/prefect/engine.py", line 1209, in orchestrate_task_run result = await task.fn(*args, **kwargs) File "/opt/pysetup/.venv/lib/python3.9/site-packages/prefect_email/message.py", line 116, in email_send_message with email_server_credentials.get_server() as server: File "/opt/pysetup/.venv/lib/python3.9/site-packages/prefect_email/credentials.py", line 138, in get_server server = SMTP_SSL(smtp_server, smtp_port, context=context) File "/usr/local/lib/python3.9/smtplib.py", line 1050, in init SMTP.__init__(self, host, port, local_hostname, timeout, File "/usr/local/lib/python3.9/smtplib.py", line 255, in init (code, msg) = self.connect(host, port) File "/usr/local/lib/python3.9/smtplib.py", line 341, in connect self.sock = self._get_socket(host, port, self.timeout) File "/usr/local/lib/python3.9/smtplib.py", line 1057, in _get_socket new_socket = self.context.wrap_socket(new_socket, File "/usr/local/lib/python3.9/ssl.py", line 501, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.9/ssl.py", line 1041, in _create self.do_handshake() File "/usr/local/lib/python3.9/ssl.py", line 1310, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129) 170919.036 | ERROR | Task run 'email_send_message-8f021083-0' - Finished in state Failed('Task run encountered an exception.')
^^ I tried a new test block and got the same result
a
That PR has been merged, but it has not been released yet. This issue should be fixed in the next release.
c
Thanks Alex. Is there a bi-weekly release, or what is Prefect's release schedule?
a
We release new versions of Prefect weekly.
👍 1
c
Hi @alex - I thought this was a part of the Prefect 2.4.1 or 2.4.2 release. I'm getting this error: 14810.677 | INFO | Flow run 'blond-barracuda' - Created task run 'email_send_message-8f021083-0' for task 'email_send_message' 114810.678 | INFO | Flow run 'blond-barracuda' - Executing 'email_send_message-8f021083-0' immediately... 114811.066 | ERROR | Task run 'email_send_message-8f021083-0' - Encountered exception during execution: Traceback (most recent call last): File "/opt/pysetup/.venv/lib/python3.9/site-packages/prefect/engine.py", line 1214, in orchestrate_task_run result = await task.fn(*args, **kwargs) File "/opt/pysetup/.venv/lib/python3.9/site-packages/prefect_email/message.py", line 116, in email_send_message with email_server_credentials.get_server() as server: File "/opt/pysetup/.venv/lib/python3.9/site-packages/prefect_email/credentials.py", line 138, in get_server server = SMTP_SSL(smtp_server, smtp_port, context=context) File "/usr/local/lib/python3.9/smtplib.py", line 1050, in init SMTP.__init__(self, host, port, local_hostname, timeout, File "/usr/local/lib/python3.9/smtplib.py", line 255, in init (code, msg) = self.connect(host, port) File "/usr/local/lib/python3.9/smtplib.py", line 341, in connect self.sock = self._get_socket(host, port, self.timeout) File "/usr/local/lib/python3.9/smtplib.py", line 1057, in _get_socket new_socket = self.context.wrap_socket(new_socket, File "/usr/local/lib/python3.9/ssl.py", line 501, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.9/ssl.py", line 1041, in _create self.do_handshake() File "/usr/local/lib/python3.9/ssl.py", line 1310, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129) 114811.159 | ERROR | Task run 'email_send_message-8f021083-0' - Finished in state Failed('Task run encountered an exception.')
a
Hey @Chris Gunderson, it looks like the Prefect Cloud UI has not been updated with the most recent release yet. If you look at the UI on a local Orion server, you can see what this input will look like once the update is made.
c
Thank you Alex