#umail - circuitpython
1 messages · Page 1 of 1 (latest)
creating a thread to keep this together
so I copied parts of init into my code to confirm if they errored out at the same line that umail was erroring at. Surprisingly, sock.recv_into(bytearray(3), 3) works in code.py
Okay, so I can read code 220 from just recv_info with the socket but after wrapping it throws the ssl invalid issue.
Interestingly, using .connect() after wrapping the socket creates the same error.
are you saying it works without SSL ? Are you using gmail ? Or a server without SSL ? Are you using the right port ?
I'm using 587 with the Gmail server. What I found with some testing is that the standard socket will return with 220 reply, but the SSLsocket will error out with the invalid SSL error
I used 465 in the example
Is port 465 or 587 better for Gmail?
While both ports offer their advantages, choosing the proper mail server configuration that best suits your needs is essential. In general, most email clients and SMTP servers now support and prefer Port 587 due to its flexible approach to TLS encryption and compatibility with modern security standards.
sounds like 587 might not be supported by CP ?
Gmail says to use 587
it supports both
Ah I can try that next then
I don't know what the difference is, if there's some aspect of TLS that is not supported in CP or maybe needs some different setup somewhere
@plucky mirage FYI
yep, 465 was the trick.
I’ll try that when i get back from travel, thanks for the added detail
Looks like I had tried 465 with my general credentials and was denied (auth error 535, ['5.7.8 Username and Password not accepted), but Google doesn't seem to allow app-specific passwords except in very narrow circumstances https://support.google.com/accounts/answer/185833?hl=en#zippy=%2Cwhy-you-may-need-an-app-password