Where to find your password
  1. Make sure Two‑Factor Authentication (2FA) is enabled for your Apple ID. Without this, App-Specific Passwords aren’t available.
  2. Visit your Apple ID account page at appleid.apple.com and sign in.
  3. In the Sign‑In and Security section, click App‑Specific Passwords → Generate an app‑specific password.
  4. Provide a name/label for the app, then confirm your identity if prompted.
  5. Copy the generated password and use it in the password field of your app.
More info: Apple Support help page
IMAP Settings
SMTP Settings