Yahoo Mail SMTP is Yahoo’s outgoing mail server that lets any email client or application send emails through your Yahoo account. The server address is smtp.mail.yahoo.com on port 587 with STARTTLS or port 465 with SSL. Since Yahoo disabled basic password authentication for third-party apps, you need to generate an App Password from your Yahoo Account Security settings — your regular Yahoo password won’t work. This guide covers the exact settings, how to create an App Password, and working code examples for PHP, Python, and Node.js.
:::note[TL;DR]
- SMTP Server:
smtp.mail.yahoo.com - Port 587 (STARTTLS) or 465 (SSL)
- Authentication: your Yahoo email + an App Password (not your login password)
- Yahoo account needs “Allow apps that use less secure sign in” or App Passwords enabled
- Daily sending limit: ~500 emails/day :::
What are the Yahoo Mail SMTP settings?
| Setting | Value |
|---|---|
| SMTP Server | smtp.mail.yahoo.com |
| Port (STARTTLS) | 587 |
| Port (SSL/TLS) | 465 |
| Encryption | STARTTLS (preferred) or SSL/TLS |
| Authentication | Required |
| Username | Your full Yahoo email address |
| Password | App Password (16-character code) |
Both ports work. Port 587 with STARTTLS is the current standard and what most clients default to. Port 465 with SSL is the older convention — some legacy mail clients use it, and Yahoo still supports it.
How do I create an App Password for Yahoo Mail?
Yahoo requires an App Password for any third-party SMTP integration. Your regular Yahoo login password will return a “535 Authentication Failed” error.
- Go to myaccount.yahoo.com/security
- Under “How you sign in to Yahoo”, click Generate app password (you may see “Manage app passwords”)
- In the dropdown, select Other app and give it a name (e.g., “Thunderbird” or “My App”)
- Click Generate
- Copy the 16-character password shown — it won’t be visible again
Use this App Password in place of your regular Yahoo password in all SMTP configurations.
:::tip If you don’t see the “Generate app password” option, you may need to enable 2-Step Verification first. Go to Security → 2-Step Verification and turn it on. App Passwords become available once 2FA is active. :::
The Scenario: You set up Thunderbird on a new laptop. You enter your Yahoo email and password and get “Login to server smtp.mail.yahoo.com failed.” You try three more times, checking for typos each time. The password is definitely correct. The problem: Thunderbird is a third-party app, and Yahoo stopped accepting your regular password for SMTP years ago. Generate an App Password and it works on the first try.
How do I configure Yahoo SMTP in an email client?
For Mozilla Thunderbird or any standard email client:
- Outgoing Server (SMTP) → Add new server
- Server Name:
smtp.mail.yahoo.com - Port:
587 - Connection Security:
STARTTLS - Authentication Method:
Normal password - Username: your full Yahoo email address (e.g.
you@yahoo.com) - Password: the App Password you generated
For Apple Mail:
- Mail → Preferences → Accounts → select your Yahoo account
- Outgoing Mail Server (SMTP) → Edit SMTP Server List
- Use the same values above
How do I send email via Yahoo 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.yahoo.com';
$mail->SMTPAuth = true;
$mail->Username = 'you@yahoo.com';
$mail->Password = 'abcdefghijklmnop'; // App Password (no spaces)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
$mail->setFrom('you@yahoo.com', 'Your Name');
$mail->addAddress('recipient@example.com');
$mail->Subject = 'Test via Yahoo SMTP';
$mail->Body = 'Sent through Yahoo Mail SMTP with PHPMailer.';
$mail->send();
echo 'Message sent.';
The setFrom address must match your authenticated Yahoo account. Yahoo will reject relay attempts where the From address doesn’t match the authenticated user.
Python with smtplib
import smtplib
from email.mime.text import MIMEText
smtp_server = "smtp.mail.yahoo.com"
port = 587
sender = "you@yahoo.com"
app_password = "abcdefghijklmnop" # App Password — not your login password
msg = MIMEText("Sent through Yahoo Mail SMTP.")
msg["Subject"] = "Test via Yahoo SMTP"
msg["From"] = sender
msg["To"] = "recipient@example.com"
with smtplib.SMTP(smtp_server, port) as server:
server.ehlo()
server.starttls()
server.login(sender, app_password)
server.sendmail(sender, "recipient@example.com", msg.as_string())
print("Email sent.")
Node.js with Nodemailer
npm install nodemailer
const nodemailer = require("nodemailer");
const transporter = nodemailer.createTransport({
host: "smtp.mail.yahoo.com",
port: 587,
secure: false, // false = STARTTLS; true = SSL on port 465
auth: {
user: "you@yahoo.com",
pass: "abcdefghijklmnop", // App Password
},
});
async function sendMail() {
await transporter.sendMail({
from: '"Your Name" <you@yahoo.com>',
to: "recipient@example.com",
subject: "Test via Yahoo SMTP",
text: "Sent through Yahoo Mail SMTP with Nodemailer.",
});
console.log("Email sent.");
}
sendMail().catch(console.error);
What are the Yahoo Mail SMTP sending limits?
Yahoo doesn’t publish exact SMTP limits, but the generally observed limits are:
| Limit Type | Approximate Value |
|---|---|
| Daily outgoing emails | ~500 emails/day |
| Recipients per email | Up to 100 recipients |
| Hourly rate | ~100 emails/hour |
These are soft limits — hitting them temporarily suspends outgoing mail (usually for an hour or until the next day). Yahoo is stricter than Gmail about bulk sending patterns. If you need reliable transactional email above these volumes, use a dedicated service like SendGrid or Amazon SES.
Common Yahoo SMTP errors and how to fix them
535 Authentication Failed You’re using your regular Yahoo password instead of an App Password. Generate one under Account Security → App Passwords.
553 Sender address rejected
The From address in your email doesn’t match the authenticated Yahoo account. They must be identical.
Connection refused on port 587
Your network or hosting provider is blocking outbound port 587. Try port 465 with SSL (secure: true in Nodemailer, ENCRYPTION_SMTPS in PHPMailer).
Login to server smtp.mail.yahoo.com failed (Thunderbird)
Same as 535 — App Password needed. Also, make sure the username field is your complete Yahoo email address, not just the username part before @yahoo.com.
Temporarily suspended / rate limited You hit Yahoo’s hourly or daily limit. Wait an hour and try again. If this is happening frequently, switch to a transactional email service with higher limits.
FAQ
Can I use smtp.mail.yahoo.com for a business domain?
Only if your domain is hosted through Yahoo Small Business or Yahoo Mail. For custom domain SMTP, services like Zoho SMTP or Gmail SMTP through Workspace are better fits.
Does Yahoo SMTP work with a @ymail.com address?
Yes. Yahoo Mail, Ymail, and AT&T Yahoo email addresses all use the same SMTP server: smtp.mail.yahoo.com. The App Password process and settings are identical.
Do I need 2FA to use Yahoo SMTP?
You need 2FA to generate App Passwords. If 2FA is off, you might see an option called “Allow apps that use less secure sign in” — enabling this lets you use your regular password. However, Yahoo periodically removes this option, so App Passwords with 2FA enabled is the more reliable setup.
Why is Yahoo asking me to sign in again when the App Password is set up?
This usually happens when the App Password was copy-pasted with extra spaces. The App Password is exactly 16 characters with no spaces — strip any whitespace before using it.
Is Yahoo SMTP a good choice for production apps?
For small-scale personal projects, yes — it’s free and the limits are reasonable. For any production app with real users, use a dedicated transactional email provider. Yahoo’s limits, undocumented rate restrictions, and occasional service interruptions make it unreliable for business-critical email.
What to Read Next
- How to Use Gmail SMTP Server for Sending Email — similar App Password setup, 500/day limit, better deliverability
- How to Use Outlook SMTP Server for Sending Email — Microsoft’s SMTP option for Hotmail and Outlook.com accounts
- How to Use SendGrid SMTP Server for Sending Email — better choice when you need higher volume or reliable deliverability