mailintel
i
consumericloudapp password

iCloud Mail IMAP and SMTP settings

iCloud Mail covers @icloud.com, @me.com and @mac.com. Access requires an app-specific password — Apple ID passwords never work over IMAP.

Connection
IMAP host
imap.mail.me.com

port 993 · SSL/TLS

SMTP host
smtp.mail.me.com

port 587 · STARTTLS

Username

your full email address
password: app-specific
Setup

Connect in three steps

  1. 1

    Turn on two-factor authentication for your Apple ID.

  2. 2

    Sign in at appleid.apple.com → Sign-In and Security → App-Specific Passwords.

  3. 3

    Use the full address as the username and the generated password.

Watch out

What usually breaks

  • iCloud Mail must be enabled on the Apple ID before IMAP works at all.

  • The username is your full iCloud address, even for @me.com and @mac.com aliases.

Detect it

Resolve it instead of hardcoding it

A custom domain on iCloud Mail has the same MX infrastructure as the consumer product. That is what mailintel reads.

icloud.ts
import { mailintel } from "mailintel";

const result = await mailintel("[email protected]");

result.provider;              // "icloud"
result.connection.imap;       // { host: "imap.mail.me.com", port: 993, security: "tls" }
result.connection.smtp;       // { host: "smtp.mail.me.com", port: 587, security: "starttls" }
result.connection.username;   // "[email protected]"
FAQ
What is iCloud Mail's IMAP server?+

imap.mail.me.com on port 993 using SSL/TLS. The username is the full email address, and an app password is required when two-factor authentication is enabled.

What is iCloud Mail's SMTP server?+

smtp.mail.me.com on port 587 using STARTTLS. Most clients also accept the alternate submission port with STARTTLS.

Does iCloud Mail need an app password?+

Yes, in practice. iCloud Mail rejects normal account passwords for IMAP and SMTP once 2FA is on, so generate an app-specific password.