@dan said in Having trouble using Gmail SMTP for email sending:
Found a way to solve it.
You really need to use 16-char app passwords with Google SMTP, as it is suggested here https://support.google.com/accounts/answer/185833/tunnel rush
It works fine then.