I encountered the same issue and resolved it the same way. It appears the swift mailer socket library is more robust.
DOLIBARR ENVIRONMENT
- Version: [11.0.3]
- Operating System: [Linux j-copew2 3.13.0-100-generic #147-Ubuntu SMP Tue Oct 18 16:48:51 UTC 2016 x86_64]
- Web Server: [ Apache/2.4.18 (Ubuntu)]
- PHP: [ 7.0.33-0ubuntu0.16.04.14]
- Database: [ 5.7.29-0ubuntu0.16.04.1]
- URL(s): [Affected URL(s) are behind firewall]