#umail - circuitpython

1 messages · Page 1 of 1 (latest)

wispy storm
#

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

wispy storm
#

Okay, so I can read code 220 from just recv_info with the socket but after wrapping it throws the ssl invalid issue.

wispy storm
#

Interestingly, using .connect() after wrapping the socket creates the same error.

eager comet
#

are you saying it works without SSL ? Are you using gmail ? Or a server without SSL ? Are you using the right port ?

wispy storm
#

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

eager comet
#

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 ?

wispy storm
#

Gmail says to use 587

eager comet
#

it supports both

wispy storm
#

Ah I can try that next then

eager comet
#

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

wispy storm
#

yep, 465 was the trick.

plucky mirage
#

I’ll try that when i get back from travel, thanks for the added detail

plucky mirage