Open a web browser and log into your Yahoo account. Go to security section. See if "ALLOW LESS SECURE APP" option is enabled. If not, enable it.
If it's already enabled. You'll probably need to create an app specific password. While you're at it, enable 2-Factor authentication if you haven't done so already.
Cheers.