M
MeshWorld.
iCloud Apple Mail SMTP Email HowTo 7 min read

How to Use iCloud Mail SMTP Server for Sending Email

Vishnu
By Vishnu
| Updated: Apr 5, 2026

iCloud Mail SMTP is Apple’s outgoing mail server for @icloud.com, @me.com, and @mac.com email addresses. The server is smtp.mail.me.com on port 587 with STARTTLS. Since Apple disabled standard password authentication for third-party apps, iCloud SMTP requires an app-specific password — a separate 16-character credential you generate at appleid.apple.com. Your regular Apple ID password won’t work. This guide covers the exact settings, how to create an app-specific password, and working code examples for PHP, Python, and Node.js.

:::note[TL;DR]

  • SMTP Server: smtp.mail.me.com
  • Port 587 (STARTTLS) — this is the only officially supported port
  • Authentication: your full iCloud email + an app-specific password
  • Two-Factor Authentication must be on to generate app-specific passwords
  • Daily sending limit: ~200 emails/day :::

What are the iCloud Mail SMTP settings?

SettingValue
SMTP Serversmtp.mail.me.com
Port587
EncryptionSTARTTLS
AuthenticationRequired
UsernameYour full iCloud email (e.g. [email protected])
PasswordApp-specific password

Port 587 with STARTTLS is the only officially documented port for iCloud SMTP. Unlike Gmail or Yahoo, Apple doesn’t maintain SSL on port 465 for iCloud SMTP — if you try 465, you’ll get a connection refused.

:::warning iCloud SMTP limits outgoing email to around 200 emails per day. It’s appropriate for personal use and low-traffic applications, not for transactional email systems or newsletters. Exceeding the limit causes temporary sending blocks. :::

How do I create an app-specific password for iCloud SMTP?

Apple requires Two-Factor Authentication (2FA) to be enabled before you can generate app-specific passwords. If 2FA isn’t on, enable it first in your Apple ID settings.

Steps:

  1. Go to appleid.apple.com and sign in
  2. Under Sign-In and Security, click App-Specific Passwords
  3. Click the + button to add a new password
  4. Enter a label (e.g., “Thunderbird SMTP” or “Contact Form”)
  5. Click Create
  6. Apple shows a 16-character password in the format xxxx-xxxx-xxxx-xxxx — copy it now

This password is shown only once. If you lose it, you revoke it and generate a new one — existing integrations using the old password stop working immediately.

The Scenario: You switched from a Windows laptop to a Mac and want to set up Thunderbird with your iCloud email. You enter your Apple ID password in the SMTP configuration. Thunderbird returns “Login to server smtp.mail.me.com failed.” Your Apple ID password is 100% correct. The problem: Apple hasn’t allowed regular passwords for third-party mail clients since 2019. You need an app-specific password. Five minutes at appleid.apple.com and Thunderbird connects immediately.

How do I configure iCloud SMTP in an email client?

For Mozilla Thunderbird:

  • Outgoing Server (SMTP) → Add new server
  • Server Name: smtp.mail.me.com
  • Port: 587
  • Connection Security: STARTTLS
  • Authentication Method: Normal password
  • Username: your full iCloud address (e.g. [email protected], [email protected], or [email protected])
  • Password: the app-specific password

For Android or third-party mobile apps, use the same values. Your @me.com and @mac.com addresses are aliases — the SMTP username should still be your @icloud.com address for most reliable authentication.

How do I send email via iCloud SMTP in code?

PHP with PHPMailer

composer require phpmailer/phpmailer
<?php
use PHPMailer\PHPMailer\PHPMailer;

require 'vendor/autoload.php';

$mail = new PHPMailer(true);

$mail->isSMTP();
$mail->Host       = 'smtp.mail.me.com';
$mail->SMTPAuth   = true;
$mail->Username   = '[email protected]';
$mail->Password   = 'xxxx-xxxx-xxxx-xxxx';  // App-specific password (no hyphens or with — both work)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port       = 587;

$mail->setFrom('[email protected]', 'Your Name');
$mail->addAddress('[email protected]');
$mail->Subject = 'Test via iCloud SMTP';
$mail->Body    = 'Sent through iCloud Mail SMTP with PHPMailer.';

$mail->send();
echo 'Message sent.';

The setFrom address must match the authenticated iCloud account. Apple doesn’t allow sending from a different address through basic SMTP auth.

Python with smtplib

import smtplib
from email.mime.text import MIMEText

smtp_server = "smtp.mail.me.com"
port = 587
sender = "[email protected]"
app_password = "xxxxxxxxxxxxxxxxxxxx"  # App-specific password (strip hyphens)

msg = MIMEText("Sent through iCloud Mail SMTP.")
msg["Subject"] = "Test via iCloud SMTP"
msg["From"] = sender
msg["To"] = "[email protected]"

with smtplib.SMTP(smtp_server, port) as server:
    server.ehlo()
    server.starttls()
    server.login(sender, app_password)
    server.sendmail(sender, "[email protected]", msg.as_string())

print("Email sent.")

The app-specific password from Apple comes formatted as xxxx-xxxx-xxxx-xxxx. Python’s smtplib accepts it with or without the hyphens — both work.

Node.js with Nodemailer

npm install nodemailer
const nodemailer = require("nodemailer");

const transporter = nodemailer.createTransport({
  host: "smtp.mail.me.com",
  port: 587,
  secure: false,    // STARTTLS — do not set to true on port 587
  auth: {
    user: "[email protected]",
    pass: "xxxx-xxxx-xxxx-xxxx",  // App-specific password
  },
});

async function sendMail() {
  await transporter.sendMail({
    from: '"Your Name" <[email protected]>',
    to: "[email protected]",
    subject: "Test via iCloud SMTP",
    text: "Sent through iCloud Mail SMTP with Nodemailer.",
  });
  console.log("Email sent.");
}

sendMail().catch(console.error);

What are the iCloud SMTP sending limits?

Apple doesn’t publish official limits, but observed behavior in 2026:

LimitApproximate Value
Daily outgoing emails~200 emails/day
Recipients per messageUp to 99

Hitting the daily limit temporarily blocks outgoing mail until the next day. Apple doesn’t send warnings when you approach the limit — it just starts rejecting sends silently.

iCloud SMTP is the most restrictive personal SMTP option covered in this series. Gmail SMTP (500/day) and Yahoo SMTP (~500/day) both have higher limits. For anything beyond personal email, use a dedicated service.

Common iCloud SMTP errors and how to fix them

535 Authentication Failed You used your Apple ID password instead of an app-specific password. Generate one at appleid.apple.com.

Connection refused on port 465 iCloud doesn’t support SSL on port 465. Use port 587 with STARTTLS only.

Login failed (Thunderbird / Apple Mail) Same as 535 — app-specific password needed. Also check that your username is the full @icloud.com address, not just your name.

Messages delayed or stuck in outbox Usually means you hit the daily limit. Wait until the next day. Also check for multiple copies of the SMTP configuration — some clients cache old/broken credentials.

454 Temporary authentication failure Occasional Apple-side issue. Try again after a few minutes. If it persists, revoke and regenerate the app-specific password.


FAQ

Can I use my @me.com or @mac.com address with iCloud SMTP?

Yes. All three — @icloud.com, @me.com, and @mac.com — are aliases for the same account. For the SMTP username, use your primary iCloud address (usually @icloud.com). If it doesn’t work with @me.com or @mac.com, try the @icloud.com version.

Does iCloud SMTP work on Windows or Linux?

Yes. iCloud SMTP is a standard SMTP server — it works on any platform and in any application that supports SMTP configuration with STARTTLS. The app-specific password setup is done at appleid.apple.com in a browser.

Can I send from a custom domain using iCloud SMTP?

No. iCloud SMTP only sends from Apple-hosted addresses (@icloud.com, @me.com, @mac.com). For custom domain SMTP, use Zoho SMTP, Google Workspace, or a transactional service like SendGrid.

How many app-specific passwords can I create?

Apple allows up to 25 app-specific passwords per Apple ID. You can revoke individual ones at appleid.apple.com without affecting the others. If you’re near the limit, revoke passwords for apps you no longer use.

Is there a way to use iCloud SMTP without an app-specific password?

No. If 2FA is enabled (required for most Apple accounts), app-specific passwords are mandatory for third-party SMTP access. There’s no alternative authentication method for iCloud SMTP.