OSError [Errno 104] ECONNRESET
Closed this issue · 2 comments
So, I used this sample code to test out the email functionality, but no matter what I do, or even if I used your example codes, I still could not connect myself to gmail.
My Code:
`
import umail
import networkssid = 'wifiname'
password = 'wifipass'sender_email = 'insert email here'
sender_name = 'stuff' #sender name
sender_app_password = 'insert app pass here'
recipient_email ='receiving email here'
email_subject ='Test Email'def connect_wifi(ssid, password):
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect(ssid, password)
while station.isconnected() == False:
pass
print('Connection successful')
print(station.ifconfig())connect_wifi(ssid, password)
smtp = umail.SMTP('smtp.gmail.com', 587) # Gmail's SSL port
smtp.login(sender_email, sender_app_password)
smtp.to(recipient_email)
smtp.write("From:" + sender_name + "<"+ sender_email+">\n")
smtp.write("Subject:" + email_subject + "\n")
smtp.write("Hello from ESP32")
smtp.send()
smtp.quit()
`
Why in the world won't google accept my responses?
Reset happens right after uMail attempts to initiate first TCP connection to Google.
This is not a uMail issue because it could not even establish a TCP connection to begin with.
You need to check your network environment.
Closed due to non-related issues.
This is not a uMail issue because it could not even establish a TCP connection to begin with.
You need to check your network environment.
My connections are all open. I don't know what you are talking about. Not to mention that my configuration regarding my ESP32 and my network is all on default.
What do you mean "check my network environment"?