iCloud Mail app-specific password for a mail app
How to create an app-specific password for iCloud Mail at account.apple.com, the IMAP and SMTP settings a third-party mail app needs, and common errors.
Sanjeev Maharjan5 min read

A third-party mail app cannot sign in to iCloud Mail with your Apple Account password. You create an app-specific password at account.apple.com, under Sign-In and Security, and type that into the mail app with the incoming server imap.mail.me.com on port 993 and the outgoing server smtp.mail.me.com on port 587.
The short version: sign in at account.apple.com, open Sign-In and Security, select App-Specific Passwords and generate one. Use it as the password in your mail app. Your Apple Account must have two-factor authentication.
What an app-specific password is
An app-specific password is a password Apple makes for one app that is not made by Apple. The app uses it in place of your Apple Account password, so your real password is never typed into, or stored by, software Apple does not control.
You can also cut it off without touching anything else. Removing it signs that one app out, and your Apple Account password and your other apps carry on as before.
Apple says that to generate and use app-specific passwords, your Apple Account must be protected with two-factor authentication. Most Apple Accounts already are. If yours is not, turn it on first in the Sign-In and Security section of the same site, or in System Settings on your Mac under your name.
How to create one at account.apple.com
These are the steps in Apple's instructions.
- Go to
account.apple.comin a browser and sign in to your Apple Account. - In the Sign-In and Security section, select App-Specific Passwords.
- Select Generate an app-specific password and follow the steps on screen. You are asked for a name: use one that tells you later which app and which Mac it was for.
- Copy the password Apple shows you. It is a row of letters in four groups joined by hyphens.
- Paste it into the password field of your mail app when it asks you to sign in.
Apple's page, Sign in to apps with your Apple Account using app-specific passwords, has the full instructions and is the place to check if the screens have changed.
Two limits to know. Apple says you can have up to 25 active app-specific passwords. It also says that any time you change or reset your main Apple Account password, all your app-specific passwords are revoked, and you must generate new ones.
IMAP and SMTP settings for iCloud Mail
Some mail apps know the iCloud servers and only ask for your address and password. If yours asks for more, these are the values Apple publishes.
| Setting | Incoming mail (IMAP) | Outgoing mail (SMTP) |
|---|---|---|
| Server | imap.mail.me.com | smtp.mail.me.com |
| Port | 993 | 587 |
| Security | SSL required. If that gives an error, try TLS | SSL required. If that gives an error, try TLS or STARTTLS |
| Username | Usually the name part of your address, for example anna for [email protected]. If that fails, the full address | Your full iCloud Mail address |
| Password | The app-specific password | The same app-specific password |
Note the difference in the username row: Apple gives the short name for incoming mail and the full address for outgoing mail. It is the detail most often typed wrong. The source is Apple's page of iCloud Mail server settings for other email client apps.
If you are setting up more than one service, the guide to IMAP and SMTP settings for Gmail, iCloud and Yahoo has all three side by side, and there is a matching guide to adding Gmail with an app password.
Common errors and how to fix them
The password is rejected
The usual cause is typing the Apple Account password. A third-party app needs the app-specific one. Paste it as Apple showed it, hyphens included, and check for a space at the end.
It worked, then stopped
If you changed or reset your Apple Account password, Apple revoked every app-specific password. Generate a new one and enter it in the mail app. The same applies if you removed the password or chose Revoke All on Apple's site.
There is no App-Specific Passwords option
Your Apple Account is probably not using two-factor authentication. Turn it on, sign in again, and the option appears in Sign-In and Security.
Mail arrives but will not send
Check the outgoing server separately. It should be smtp.mail.me.com on port 587, with authentication on, the full address as the username and the app-specific password. Port 465 is not in Apple's instructions for iCloud Mail.
How Mailvie handles iCloud Mail
Mailvie signs in to iCloud with an app-specific password. On the Add an account screen you pick iCloud, enter your email address, the app-specific password and a name for the sidebar. The incoming server is filled in for you, and a button opens Apple's account page so you can generate the password.
The password is saved in the macOS Keychain on your Mac and sent only to Apple's mail server. Mailvie has no account of its own and runs no server that sees your mail, and it publishes the list of connections the app makes.
One limit in version 0.1.0: Mailvie can read and search iCloud Mail, but it cannot send from an iCloud account yet. Mailvie sends over port 465 only, and iCloud's outgoing server uses port 587. Sending from Gmail and Yahoo is not affected.
Reading and search are free. Mailvie runs on Apple Silicon Macs with macOS 14 or later: you can download Mailvie for Mac, and if a sign-in fails, Mailvie support is the place to ask.
Questions people ask
Is an app-specific password the same as my Apple Account password?
No. It is a separate password that Apple generates for one app. Your Apple Account password stays the same and is never given to the mail app. Removing the app-specific password signs out only the app that used it.
Do I need two-factor authentication to make one?
Yes. Apple says your Apple Account must be protected with two-factor authentication before you can generate or use app-specific passwords. Without it, the option does not appear in the Sign-In and Security section.
How many app-specific passwords can I have?
Apple says you can have up to 25 active at one time. You can remove them one by one or all together from the App-Specific Passwords page at account.apple.com when you no longer need them.
Why did my mail app stop working after I changed my Apple password?
Apple revokes all app-specific passwords whenever the main Apple Account password is changed or reset. Generate a new app-specific password and enter it in each third-party app that used the old one.
Written by Sanjeev Maharjan
Sanjeev Maharjan builds Mailvie, a mail app for the Mac. Found a mistake in this guide? Write to [email protected].