Skip to main content

Credentials

The Email resource connects to any email account via IMAP (reading) and SMTP (sending). You need the server hostnames and a password or app password.

1. Find Your IMAP/SMTP Settings

ResourceIMAP HostIMAP PortSMTP HostSMTP Port
Outlook/365outlook.office365.com993smtp.office365.com587
Yahooimap.mail.yahoo.com993smtp.mail.yahoo.com587
Fastmailimap.fastmail.com993smtp.fastmail.com587
iCloudimap.mail.me.com993smtp.mail.me.com587
ProtonMail127.0.0.11143127.0.0.11025
Self-hostedYour server hostname993Your server hostname587
ProtonMail requires ProtonMail Bridge running locally.

2. Create an App Password

Most resources require an app password instead of your regular account password. This is a one-time password specifically for third-party apps. Outlook / Microsoft 365:
  1. Go to https://account.microsoft.com/security
  2. Security -> Advanced security options
  3. App passwords -> Create a new app password
  4. Copy the generated password
Yahoo:
  1. Go to https://login.yahoo.com/account/security
  2. Generate app password
  3. Select Other App, name it (e.g., “Mirage”)
  4. Copy the generated password
Fastmail:
  1. Go to https://www.fastmail.com/settings/security/tokens
  2. New App Password
  3. Select IMAP/SMTP access
  4. Copy the generated password
iCloud:
  1. Go to https://appleid.apple.com/account/manage
  2. Sign-In and Security -> App-Specific Passwords
  3. Generate an app-specific password
  4. Copy the generated password
Self-hosted / Other: Use your regular email password, or whatever your mail server requires.

3. Set Environment Variables

# .env.development
IMAP_HOST=imap.fastmail.com
SMTP_HOST=smtp.fastmail.com
EMAIL_USERNAME=you@fastmail.com
EMAIL_PASSWORD=your-app-password

Troubleshooting

“Authentication failed” - Make sure you’re using an app password, not your regular account password. Most resources block regular passwords for IMAP/SMTP access. “Connection refused” - Check the hostname and port. Some networks block port 993/587. For ProtonMail, make sure Bridge is running. “SSL handshake failed” - If your server uses STARTTLS on port 143 instead of SSL on port 993, set use_ssl=False and imap_port=143. For Python configuration, see the Python Email Setup guide.