Problem getting uMail to work for me!
Closed this issue · 2 comments
I'm a novice (dummy) when it comes to python but have been able to send emails using a standard raspberry pi. I now want to duplicate a rather simple program on a raspberry pi pico W using micropthon. I want to send an email. I have loaded uMail into the pico W and the command "import umail" seems to work just fine. I transfer the basic example from github to Thonny, change all the variables to my username, password, etc.
import umail
smtp = umail.SMTP('smtp.gmail.com', 587, username='my@gmail.com', password='mypassword')
smtp.to('someones@gmail.com')
smtp.send("This is an example.")
smtp.quit()
Line 2 on Thonny has the letters SMTP in black, not red as in the github example. The word "import" on line 1 is red. This would seem to be a problem but I have no idea what it is.
When on run the code on the pico W, I get the following error:
Traceback (most recent call last):
File "", line 2, in
File "umail.py", line 30, in init
OSError: -6
Line 20 on umail.py is "addr = usocket.getaddrinfo(host, port)[0][-1]"
I am sure that I am doing something really stupid. Any ideas?
Found what I was doing wrong. I didn't have a good wifi connection to the pico W. Fixed that and everything words well. Thanks for uMail.py,
Hey, have you successfully sent an email? I'm getting an error called 'AssertionError: auth error 535'. If you faced this type of error then would you please give me some suggestions according to this problem. Thanks in advance.