Is it possible your email host has limits and you are sending too many emails? You may want to contact them and see why your connect might fail intermittently and see if there are any limits to the number of emails per second you are allowed to send.