OAuth for iCloud developer guide

Connect iCloud Mail with IMAP and SMTP

IMAP is imap.mail.me.com port 993 with the bare mail name as username. SMTP is smtp.mail.me.com port 587 with the full address. Both need an app-specific password, not your Apple Account password.

Figment editorial teamPublished Updated Facts checked November 12, 2026

iCloud Mail works with any IMAP and SMTP client. Two things trip up almost every setup: the username format differs between the incoming and outgoing servers, and iCloud requires an app-specific password instead of your Apple Account password. Get those right and the connection is straightforward.

What are the iCloud Mail server settings?

Use this table as your single reference. The settings come from Apple's official iCloud Mail setup guide (support.apple.com/102525).

IMAP (incoming)SMTP (outgoing)
Serverimap.mail.me.comsmtp.mail.me.com
Port993587
SecuritySSL / TLSSSL / TLS (STARTTLS on port 587)
UsernameBare mail name, no domain (e.g. johnappleseed)Full email address (e.g. johnappleseed@icloud.com)
PasswordApp-specific passwordSame app-specific password
AuthenticationRequiredRequired

POP is not supported. iCloud Mail only exposes IMAP for incoming mail.

Work through this checklist before you open your client settings:

  • Two-factor authentication is enabled on your Apple Account
  • iCloud Mail is active (enabled in iCloud settings on any Apple device)
  • App-specific password generated and copied from account.apple.com
  • IMAP: server imap.mail.me.com, port 993, SSL/TLS on, username = bare name
  • SMTP: server smtp.mail.me.com, port 587, SSL/TLS on (STARTTLS mechanism), username = full address
  • Authentication enabled on the SMTP connection
  • Test send and receive after saving

What do I need before I start?

  • Two-factor authentication. Apple requires 2FA on your Apple Account before you can generate an app-specific password. If it is off, enable it at account.apple.com under Sign-In and Security.
  • An active iCloud Mail address. iCloud Mail is not on by default for every Apple Account. If you have never used it, enable iCloud Mail in System Settings (macOS) or Settings → iCloud (iOS/iPadOS). Apple assigns an @icloud.com address at activation.
  • An app-specific password. iCloud Mail does not accept your Apple Account password directly in third-party clients. An app-specific password is a separate reusable token generated at account.apple.com, as described next.

How do I generate an app-specific password?

Create and manage app-specific passwords at account.apple.com. These steps follow Apple's documentation (support.apple.com/102654).

  1. Go to account.apple.com and sign in with your Apple Account.
  2. Select Sign-In and Security, then App-Specific Passwords.
  3. Click the + button (or Generate an App-Specific Password).
  4. Enter a label, for example Thunderbird or My mail app, and click Create.
  5. Apple displays a 16-character password. Copy it immediately, because it will not be shown again.
  6. Paste the password into your email client's password field for both IMAP and SMTP.

An Apple Account can hold up to 25 active app-specific passwords. They are reusable credentials: the same password keeps working until you revoke it or change your Apple Account password. Revoke unused passwords from the same App-Specific Passwords screen.

How do I configure IMAP?

Open your email client's account or server settings and enter the following for incoming mail.

Server
imap.mail.me.com
Port
993
Connection security
SSL/TLS (sometimes labelled "Use SSL")
Username
your iCloud Mail name without the domain, for example johnappleseed, not johnappleseed@icloud.com
Password
the app-specific password you generated

The username format is the most common source of IMAP authentication errors. Some clients pre-fill the username from the email address you enter, so delete the @icloud.com part before saving if yours does. If the bare name fails to authenticate in a particular client, try the full email address (for example johnappleseed@icloud.com) as a fallback, because Apple's documentation notes both forms.

After saving, your client should fetch the IMAP folder list. iCloud Mail exposes standard folders (Inbox, Sent, Drafts, Trash, Archive) plus any mailboxes you have created.

How do I configure SMTP?

For outgoing mail the username format flips: use the full email address, not the bare name.

Server
smtp.mail.me.com
Port
587
Connection security
SSL / TLS required. Apple labels this "SSL Required"; the encryption mechanism on port 587 is STARTTLS, which clients may list as "TLS", "STARTTLS", or "SSL"
Authentication
required. Select "Normal password" or equivalent
Username
full iCloud Mail address, for example johnappleseed@icloud.com
Password
the same app-specific password used for IMAP

If your client asks whether to authenticate the SMTP server, say yes. iCloud's outgoing server requires authentication and rejects unauthenticated submissions. Send a test message after saving the SMTP settings to confirm delivery before you rely on the connection.

Should I use Apple Account authorization instead of an app-specific password?

Use Apple Account authorization when you build a user-facing app that requests iCloud access on behalf of end users and the app qualifies for Apple's authorization program. Apple offers this newer flow for supported third-party apps accessing iCloud Mail, Calendar, and Contacts (support.apple.com/121539). Instead of a static app-specific password, the user approves the app through a consent screen and Apple manages a revocable authorization for that app. The app never sees the Apple Account password.

This is similar in concept to OAuth. The authorization is visible and revocable at account.apple.com, and removing it immediately cuts off that app's access without affecting other connected apps. To revoke, go to account.apple.com → Sign-In and Security → Account Data Sharing, then remove the app.

  • App-specific password: works with any standards-compliant IMAP/SMTP client today. Use it for desktop mail clients, scripts, or tooling that you control.
  • Apple Account authorization: use it for user-facing apps that qualify for Apple's program. Developer enrollment contact: developer.apple.com/contact/request/icloud-oauth2.

How do I connect other Apple data to my app with Figment?

IMAP and SMTP are Apple-supported protocols that your application can use directly with the settings above. For programmatic access to other Apple services (iMessage, or read access to Contacts, Calendar, and Reminders), Figment's OAuth for iCloud provides a user-approved consent layer. Your app receives a scoped access token, and the developer application never receives the Apple Account password.

For the available scopes and the authorization flow, see OAuth for iCloud: Connect Apple Data to Your App. To register your app and explore the developer sandbox, visit Connect Apple Account.

Connect Apple data to your app

Register your app and start with synthetic sandbox data. Choose the permissions your app needs.

Connect Apple Account

Sandbox is free. Live access is $14 or $29 per connected Apple Account, per month.