New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SMTP and APIUpdated 26 Oct 2026

iCloud Mail SMTP Settings: Server, Port, App-Specific Password and Troubleshooting

iCloud Mail SMTP server, port and security settings, how to create an app-specific password, how aliases and the From address behave, common errors, limits and when to use a dedicated relay for application mail.

JL
Written by Jonas Lindqvist
Security Engineer
Reviewed by Mateus Oliveira
  • Published14 Oct 2024
  • Read time6 min
  • Length1,187 words
Share this guide

Apple's own Mail app sets up an iCloud account automatically. Anywhere else, whether that is another mail client, a printer that scans to email, a website form or a small script, you must enter the settings yourself. The details that trip people up are the security mode, the full address as the username and the fact that a normal Apple Account password will not work for third-party apps.

This guide lists the server details, walks through creating the special password Apple requires, explains how addresses and aliases behave and covers common errors. It closes with a frank look at when iCloud is the wrong sender for application mail.

Serversmtp.mail.me.com
Port and security587 with STARTTLS
UsernameYour full iCloud address in most cases
PasswordAn app-specific password generated in your Apple Account settings

Provider settings can change, so confirm them against Apple's current support pages before relying on them.

Outgoing (SMTP) settings

SettingValueNotes
SMTP serversmtp.mail.me.comApple's outgoing mail host for iCloud Mail
Port587Submission port. See SMTP submission
SecuritySTARTTLS (TLS after connect)Choose "TLS" or "STARTTLS" in the client, not plain
AuthenticationRequiredUse the login below
UsernameYour full iCloud email addressSome clients accept the part before the @ for older accounts; try the full address first
PasswordApp-specific passwordNot your Apple Account password
From addressThe account address or one of its aliasesOther addresses may be rejected

Incoming settings

ProtocolServerPortSecurity
IMAPimap.mail.me.com993SSL/TLS

Apple supports IMAP for iCloud Mail in third-party clients. Use IMAP so that your folders and read status sync across devices. See how IMAP works.

Create an app-specific password

  1. Turn on two-factor authentication for your Apple Account, which Apple requires before app-specific passwords are available.
  2. Sign in to your Apple Account management page in a browser.
  3. Open the sign-in and security section and choose the option to generate an app-specific password.
  4. Give it a label that tells you which app will use it.
  5. Copy the password and store it securely; it is shown only once.
  6. Enter it in the SMTP and IMAP password fields of the third-party app.
  7. Revoke it from the same page if you stop using the app or suspect exposure.

Treat the password like any secret: do not commit it to code, paste it in tickets or share it in chat.

Aliases, Hide My Email and the From address

  • iCloud addresses. An account can have a primary address and aliases at Apple domains. You can usually send from any of your own addresses.
  • Custom domains. Apple lets you use a custom email domain with iCloud Mail on supported plans. That requires adding DNS records, including MX, SPF and DKIM, as the setup instructs. See authenticating your domain.
  • Hide My Email. Random forwarding addresses protect your real address when you sign up for services. They are for receiving and replying, not for application sending.
  • Reply-To. You can set a different reply address in the client without changing the From address.
  • Mismatches. Sending as an address that does not belong to the account can be refused. See sender address rejected errors.

Example configurations

# PHP (PHPMailer)
$mail->isSMTP();
$mail->Host       = 'smtp.mail.me.com';
$mail->SMTPAuth   = true;
$mail->Username   = '[email protected]';
$mail->Password   = getenv('ICLOUD_APP_PASSWORD');
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port       = 587;

# Python (smtplib)
import smtplib, os
with smtplib.SMTP('smtp.mail.me.com', 587) as s:
    s.starttls()
    s.login('[email protected]', os.environ['ICLOUD_APP_PASSWORD'])
    s.sendmail('[email protected]', ['[email protected]'], msg.as_string())

For more complete code with attachments and HTML parts, see sending with Python smtplib.

Limits you should expect

  • Daily sending and per-message recipient limits apply and may change; check Apple's current documentation.
  • Attachment size is limited. See attachment limits across providers.
  • Bulk or repetitive sending may be throttled or the account restricted.
  • Messages are authenticated for Apple's domains, not yours, unless you use a custom domain feature.
  • There is no event feed for delivery, bounces or complaints suitable for applications.

Common errors and fixes

SymptomLikely causeFix
Authentication failedNormal password used, or wrong username, or revoked app-specific passwordGenerate a new app-specific password and use the full address. See 535 errors
Cannot connect or timeoutWrong port or blocked networkUse 587; test with a command line tool. See testing SMTP
TLS errorClient set to implicit SSL on port 587 or to no encryptionChoose STARTTLS for port 587
Sender not allowedFrom address not owned by the accountSend from the account address or alias
Temporary error and queueRate limitsSlow down. See queued and deferred mail
Recipients cannot see your messageSpam filteringCheck content and authentication. See spam troubleshooting

When iCloud is the wrong tool

NeediCloud MailDedicated relay
Your own domain in the From line with full authenticationLimited to custom domain feature for personal useFull control over SPF, DKIM and DMARC
Volume and ratePersonal limitsPlans sized for applications
Delivery and bounce dataNone for developersEvents and webhooks. See delivery webhooks
Suppression of bad addressesManualAutomatic
Service termsPersonalBusiness and transactional
Support for APIsNoYes. See API reference

Use iCloud for personal mail and for small, occasional automated messages such as a home server notice. Anything that sends to customers should go through a relay on your own domain. See what an SMTP relay is.

Sending to iCloud recipients

If you send to iCloud addresses, expect strict filtering. Authenticate with SPF, DKIM and DMARC, avoid links to poor-reputation domains and keep complaint rates low. Privacy features in Apple Mail can affect open tracking, so measure engagement by clicks and replies. See Apple Mail Privacy Protection.

Checking the connection step by step

When a client fails to send, test the pieces separately. First confirm that the server name resolves and that your network lets you reach port 587; some networks block outgoing mail ports. Second, confirm that the client uses STARTTLS and not implicit SSL for that port. Third, check the credentials with a tool that prints the server responses, so you can see whether the login is accepted and which stage fails. Fourth, send a short plain text message to a test address before adding HTML or attachments. The server reply usually names the cause, such as a rejected sender or a rate limit, so keep the exact text.

Using iCloud with printers and devices

Scanners, printers and small servers often offer only basic mail setup screens that do not support modern authentication. App-specific passwords make these devices workable without sharing your main password. Create one password per device, label it clearly and revoke it if the device is lost or replaced. If the device cannot use STARTTLS on port 587, consider a local relay that accepts its connection and forwards securely, or move the alerts to a service built for devices.

Security checklist

  • Use one app-specific password per application.
  • Never reuse your Apple Account password in third-party apps.
  • Keep two-factor authentication on.
  • Store passwords in a secret manager.
  • Use only encrypted connections.
  • Review and revoke unused app-specific passwords periodically.

The recipe for iCloud is short: smtp.mail.me.com, port 587 with STARTTLS, your full address and an app-specific password. Use it for personal clients and small tools, and give production mail a relay of its own.

Send application mail from your own domain Authenticate your domain and track delivery events.

Explore the SMTP relay

References and further reading

Frequently asked questions

What is the iCloud SMTP server?

smtp.mail.me.com on port 587 with STARTTLS.

Why does my iCloud password not work in another app?

Third-party apps need an app-specific password generated in your Apple Account settings, with two-factor authentication on.

What username should I use?

Your full iCloud email address.

Can I send from an alias?

Usually yes, if the alias belongs to the same account. Other addresses may be rejected.

Is iCloud suitable for bulk email?

No. It has personal limits and no delivery data. Use a dedicated relay on your own domain for application mail.

Topics#icloud#apple#smtp settings#app-specific password#mail clients
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales