MKR1010 using EMailSender library works twice then will not connect to email server

I was checking WiFi.status() ==3 to monitor WiFi connection, but even with WiFi.status() ==3 I needed to reconnect to WiFi to send third message.