Where to find your password
  1. Sign in to your Yahoo Account Security page.
  2. Under "External connections," click Create app password.
  3. Enter your app's name in the text field.
  4. Click Generate password.
  5. Use the one-time password to log in to your 3rd party app.
  6. Click Done.
More info: Yahoo Support help page
IMAP Settings
SMTP Settings