Email Authentication Failures

Fix SMTP, OAuth, and IMAP auth errors in OpenClaw

Quick Diagnosis

openclaw doctor --channel email

Common Errors

535 Authentication Failed (SMTP)

Your SMTP credentials are incorrect or your account requires an App Password.

OAuth Token Expired

OAuth tokens expire. Re-authenticate:

openclaw channels reconnect email

Follow the browser prompt to re-authorize OpenClaw's access to your mailbox.

IMAP Connection Refused

  1. Verify IMAP is enabled in your email provider's settings (Gmail: Settings → See all settings → Forwarding and POP/IMAP)
  2. Check the IMAP host and port in config.yaml:
    Gmail: imap.gmail.com:993, Outlook: outlook.office365.com:993
  3. Ensure port 993 is not blocked by your firewall

SSL Certificate Error

channels:
  email:
    imap:
      tls: true
      tls_reject_unauthorized: false  # only for self-signed certs
Email Automation Guide
Set up automated email workflows with OpenClaw.
Guides →