With Gmail you should have 2-factor enabled and be using App passwords. You create a separate password per App and instead of using your Gmail password you use your Gmail email address and the new App password you created.
https://security.google.com
Works reliably for me, with multiple...