SMTP authentication problem

i tried SMTP authentication following this url: https://docs.gitea.io/en-us/authentication/ . but no luck, it gives me username and password incorrect error
(i was try it with google and yandex)