-
I want to send an simple text email when a specific event happens. However, if I move the following code inside a function void sendMail() and then I call that function I get: I am trying to figure out why the connection is closed when I have the code in a function... `
` |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
The SSL client has stopped. It looks like your device memory is not enough for SSL client to be allocated to perform SSL handshake. |
Beta Was this translation helpful? Give feedback.
-
This is your problem.
At first, acSenseStatus value as set to 0, then it changes the value as it read from ADC. And you should know that you cannot use ADC2 while using WiFi because it is reserved for WiFI. GPIO 0 is ADC2 CH1 For ref . |
Beta Was this translation helpful? Give feedback.
I see that you are using
WiFiManager
.If you look at the code, you will notice that the library has this function.
MailClient.networkReconnect(true);
Do you think that function is for and why it works in all library examples, and it handles network reconnection effectively?
It uses
WiFi
core function calledreconnect
to reconnect by checking theWiFi
status, reconnect when it disconnected, watching for theWiFi
status for 10 seconds before reconnecting again if it still disconnected.This is the feature that works in all my libraries that work with network.
Then you have to remove this or pass false to the function.
MailClient.networkReconnect(false);