Skip to content

Trying to send mail from a function #339

Closed Answered by mobizt
JABIoT asked this question in Q&A
Discussion options

You must be logged in to vote

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 called reconnect to reconnect by checking the WiFi status, reconnect when it disconnected, watching for the WiFi 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);

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@JABIoT
Comment options

@mobizt
Comment options

@JABIoT
Comment options

@mobizt
Comment options

Answer selected by mobizt
@mobizt
Comment options

@JABIoT
Comment options

Comment options

You must be logged in to vote
1 reply
@mobizt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants