update Updated January 2026 verified 2FA Required

Yahoo Mail SMTP Settings (2026)

Complete guide to configure Yahoo Mail SMTP for sending emails from your applications. Learn how to create App Passwords and integrate with Python, PHP, Node.js, and more.

Yahoo Yahoo SMTP Quick Reference

SMTP Server smtp.mail.yahoo.com
Port (SSL/TLS) 465 (SSL - Recommended)
Port (STARTTLS) 587 (TLS)
Username Your full Yahoo email (example@yahoo.com)
Password App Password (NOT your account password)
Authentication LOGIN / PLAIN
Daily Limit ~500 emails/day
key

App Password Required

Yahoo Mail requires an App Password for SMTP access. Your regular Yahoo password will NOT work. You must:

  1. Enable Two-Factor Authentication (2FA) on your Yahoo account
  2. Generate an App Password for your email client/application
  3. Use the 16-character App Password instead of your account password

1 Enable Two-Factor Authentication

Before you can create an App Password, you must enable 2FA on your Yahoo account:

1

Go to Yahoo Account Security

Sign in to your Yahoo account and navigate to:

https://login.yahoo.com/myaccount/security/ open_in_new
2

Click on Two-step verification

Find the 'Two-step verification' option and click to enable it.

3

Choose verification method

You can use:

  • check_circle Phone number (SMS codes)
  • check_circle Authenticator app (Google Authenticator, Authy, etc.)
  • check_circle Security key (hardware token)
4

Complete verification

Follow the prompts to verify your phone number or set up your authenticator app.

2 Generate App Password

Once 2FA is enabled, create an App Password for SMTP access:

1

Access App Passwords

Go to your Yahoo Account Security page and click 'Generate app password' or 'Other ways to sign in' > 'App passwords':

https://login.yahoo.com/myaccount/security/app-password open_in_new
2

Select app type

Enter a custom name for your app (e.g., 'My Application' or 'SMTP Client').

3

Click 'Generate'

Yahoo will generate a 16-character password.

4

Copy and save your App Password

The password will look like:

abcd efgh ijkl mnop

Important: Copy this password now! Yahoo will only show it once. Use it WITHOUT spaces in your SMTP configuration.

3 Configure SMTP Settings

Use these settings in your email client or application:

# Yahoo SMTP Configuration
SMTP_HOST=smtp.mail.yahoo.com
SMTP_PORT=465        # or 587 for STARTTLS
SMTP_SECURITY=SSL    # or TLS for port 587
SMTP_USERNAME=your-email@yahoo.com
SMTP_PASSWORD=abcdefghijklmnop  # App Password (no spaces)

code Code Examples

# Python - Using smtplib (standard library)
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

# Yahoo SMTP Configuration
SMTP_HOST = "smtp.mail.yahoo.com"
SMTP_PORT = 465  # SSL port
YAHOO_EMAIL = "your-email@yahoo.com"
APP_PASSWORD = "abcdefghijklmnop"  # Your App Password (no spaces)

def send_email(to_email, subject, body):
    # Create message
    msg = MIMEMultipart()
    msg['From'] = YAHOO_EMAIL
    msg['To'] = to_email
    msg['Subject'] = subject
    msg.attach(MIMEText(body, 'plain'))

    # Connect and send using SSL
    with smtplib.SMTP_SSL(SMTP_HOST, SMTP_PORT) as server:
        server.login(YAHOO_EMAIL, APP_PASSWORD)
        server.send_message(msg)
        print("Email sent successfully!")

# Alternative: Using STARTTLS (port 587)
def send_email_tls(to_email, subject, body):
    msg = MIMEMultipart()
    msg['From'] = YAHOO_EMAIL
    msg['To'] = to_email
    msg['Subject'] = subject
    msg.attach(MIMEText(body, 'plain'))

    with smtplib.SMTP(SMTP_HOST, 587) as server:
        server.starttls()  # Upgrade to TLS
        server.login(YAHOO_EMAIL, APP_PASSWORD)
        server.send_message(msg)

# Usage
send_email(
    "recipient@example.com",
    "Hello from Yahoo!",
    "This email was sent via Yahoo SMTP."
)
// PHP - Using PHPMailer
// Install: composer require phpmailer/phpmailer

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

require 'vendor/autoload.php';

$mail = new PHPMailer(true);

try {
    // Server settings
    $mail->isSMTP();
    $mail->Host       = 'smtp.mail.yahoo.com';
    $mail->SMTPAuth   = true;
    $mail->Username   = 'your-email@yahoo.com';
    $mail->Password   = 'abcdefghijklmnop';  // App Password
    $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;  // SSL
    $mail->Port       = 465;

    // For TLS (port 587) use:
    // $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
    // $mail->Port       = 587;

    // Recipients
    $mail->setFrom('your-email@yahoo.com', 'Your Name');
    $mail->addAddress('recipient@example.com');

    // Content
    $mail->isHTML(true);
    $mail->Subject = 'Hello from Yahoo!';
    $mail->Body    = 'This is a <b>test email</b> sent via Yahoo SMTP.';
    $mail->AltBody = 'This is a test email sent via Yahoo SMTP.';

    $mail->send();
    echo 'Email sent successfully!';
} catch (Exception $e) {
    echo "Failed to send: {$mail->ErrorInfo}";
}
// Node.js - Using Nodemailer
// Install: npm install nodemailer

const nodemailer = require('nodemailer');

// Create transporter with Yahoo SMTP
const transporter = nodemailer.createTransport({
    host: 'smtp.mail.yahoo.com',
    port: 465,
    secure: true, // true for SSL (port 465)
    auth: {
        user: 'your-email@yahoo.com',
        pass: 'abcdefghijklmnop' // App Password
    }
});

// For STARTTLS (port 587) use:
// const transporter = nodemailer.createTransport({
//     host: 'smtp.mail.yahoo.com',
//     port: 587,
//     secure: false,
//     requireTLS: true,
//     auth: { user: '...', pass: '...' }
// });

// Send email
async function sendEmail() {
    try {
        const info = await transporter.sendMail({
            from: '"Your Name" <your-email@yahoo.com>',
            to: 'recipient@example.com',
            subject: 'Hello from Yahoo!',
            text: 'This email was sent via Yahoo SMTP.',
            html: '<p>This email was sent via <b>Yahoo SMTP</b>.</p>'
        });

        console.log('Email sent:', info.messageId);
    } catch (error) {
        console.error('Error sending email:', error);
    }
}

sendEmail();
# Ruby - Using Mail gem
# Install: gem install mail

require 'mail'

# Configure Yahoo SMTP
Mail.defaults do
  delivery_method :smtp, {
    address:              'smtp.mail.yahoo.com',
    port:                 465,
    user_name:            'your-email@yahoo.com',
    password:             'abcdefghijklmnop',  # App Password
    authentication:       :login,
    ssl:                  true,
    tls:                  true,
    enable_starttls_auto: true
  }
end

# Create and send email
mail = Mail.new do
  from     'your-email@yahoo.com'
  to       'recipient@example.com'
  subject  'Hello from Yahoo!'
  body     'This email was sent via Yahoo SMTP.'
end

mail.deliver!
puts "Email sent successfully!"

# HTML email example
html_mail = Mail.new do
  from     'your-email@yahoo.com'
  to       'recipient@example.com'
  subject  'HTML Email from Yahoo'

  text_part do
    body 'Plain text version'
  end

  html_part do
    content_type 'text/html; charset=UTF-8'
    body '<h1>Hello!</h1><p>HTML content here.</p>'
  end
end

html_mail.deliver!
// Go - Using net/smtp and crypto/tls
package main

import (
    "crypto/tls"
    "fmt"
    "net/smtp"
    "strings"
)

func main() {
    // Yahoo SMTP Configuration
    smtpHost := "smtp.mail.yahoo.com"
    smtpPort := "465"
    yahooEmail := "your-email@yahoo.com"
    appPassword := "abcdefghijklmnop" // App Password

    // Email content
    to := []string{"recipient@example.com"}
    subject := "Hello from Yahoo!"
    body := "This email was sent via Yahoo SMTP using Go."

    // Build message
    message := strings.NewReader(
        "From: " + yahooEmail + "\r\n" +
        "To: " + strings.Join(to, ",") + "\r\n" +
        "Subject: " + subject + "\r\n" +
        "MIME-Version: 1.0\r\n" +
        "Content-Type: text/plain; charset=\"utf-8\"\r\n" +
        "\r\n" + body,
    )

    // TLS config
    tlsConfig := &tls.Config{
        ServerName: smtpHost,
    }

    // Connect with SSL
    conn, err := tls.Dial("tcp", smtpHost+":"+smtpPort, tlsConfig)
    if err != nil {
        panic(err)
    }

    // Create SMTP client
    client, err := smtp.NewClient(conn, smtpHost)
    if err != nil {
        panic(err)
    }
    defer client.Close()

    // Authenticate
    auth := smtp.PlainAuth("", yahooEmail, appPassword, smtpHost)
    if err = client.Auth(auth); err != nil {
        panic(err)
    }

    // Send email
    if err = client.Mail(yahooEmail); err != nil {
        panic(err)
    }
    for _, addr := range to {
        if err = client.Rcpt(addr); err != nil {
            panic(err)
        }
    }

    w, err := client.Data()
    if err != nil {
        panic(err)
    }

    _, err = message.WriteTo(w)
    if err != nil {
        panic(err)
    }

    err = w.Close()
    if err != nil {
        panic(err)
    }

    client.Quit()
    fmt.Println("Email sent successfully!")
}

public Regional Yahoo SMTP Servers

Region SMTP Server Domains
Global (US) smtp.mail.yahoo.com yahoo.com
United Kingdom smtp.mail.yahoo.co.uk yahoo.co.uk
Australia smtp.mail.yahoo.com.au yahoo.com.au
Germany smtp.mail.yahoo.de yahoo.de
France smtp.mail.yahoo.fr yahoo.fr
Italy smtp.mail.yahoo.it yahoo.it
Canada smtp.mail.yahoo.ca yahoo.ca
India smtp.mail.yahoo.co.in yahoo.co.in

info Use the SMTP server matching your Yahoo email domain. All regional servers use the same ports (465/587) and require App Passwords.

speed Yahoo Mail Sending Limits

Limit Type Free Account Yahoo Mail Plus
Daily emails ~500 ~500
Recipients per email 100 100
Max attachment size 25 MB 25 MB
Storage 1 TB 1 TB
warning

Not for bulk email

Yahoo Mail is designed for personal correspondence, not mass mailing. For high-volume sending, use a dedicated email service like SendGrid, Mailgun, or Amazon SES.

build Troubleshooting

error 535 Authentication failed
expand_more

This error occurs when Yahoo rejects your login credentials.

Solutions:

  • check_circle Make sure you're using an App Password, NOT your account password
  • check_circle Enter the App Password WITHOUT spaces (e.g., 'abcdefghijklmnop' not 'abcd efgh ijkl mnop')
  • check_circle Verify 2FA is enabled on your Yahoo account
  • check_circle Generate a new App Password if the current one doesn't work
error Connection timeout / Connection refused
expand_more

Unable to connect to Yahoo's SMTP server.

Solutions:

  • check_circle Check if your ISP/firewall blocks port 465 or 587
  • check_circle Try switching between port 465 (SSL) and 587 (TLS)
  • check_circle Verify the SMTP hostname matches your Yahoo domain
  • check_circle Test connectivity: telnet smtp.mail.yahoo.com 465
error 553 From address not verified
expand_more

The 'From' address doesn't match your Yahoo account.

Solutions:

  • check_circle Use your Yahoo email address as the 'From' address
  • check_circle The 'From' address must match the account you're authenticating with
error 550 Request failed; mailbox unavailable
expand_more

You've exceeded Yahoo's sending limits or the message was rejected.

Solutions:

  • check_circle Wait 24 hours if you've hit the daily sending limit
  • check_circle Check that the recipient email address exists
  • check_circle Review your email content for spam triggers
warning App Password option not available
expand_more

The App Password option is not showing in your Yahoo account settings.

Solutions:

  • check_circle Enable Two-Factor Authentication first - App Passwords require 2FA to be active
  • check_circle Make sure you're on the correct security page: Account Security
  • check_circle Try using a different browser or clearing your cache

quiz Frequently Asked Questions

Why can't I use my regular Yahoo password for SMTP? expand_more

Yahoo requires App Passwords for third-party applications as a security measure. When you enable Two-Factor Authentication (2FA), your regular password alone cannot authenticate SMTP connections. App Passwords are unique, generated passwords that allow specific apps to access your account without exposing your main password. This protects your account even if an app password is compromised - you can revoke it without changing your main account password.

Should I use port 465 or 587 for Yahoo SMTP? expand_more

Both ports work reliably with Yahoo:

  • Port 465 (SSL): Uses implicit SSL/TLS. Connection is encrypted from the start. Generally recommended as it's simpler to configure.
  • Port 587 (STARTTLS): Starts as plain text, then upgrades to TLS. Standard SMTP submission port, widely supported.

If port 465 is blocked by your ISP or hosting provider, try 587 instead.

How many App Passwords can I create? expand_more

You can create multiple App Passwords for different applications. Yahoo allows you to manage them in your Account Security settings. It's recommended to create a separate App Password for each application so you can revoke access to one app without affecting others. You can view and delete existing App Passwords at any time.

Does Yahoo support sending from custom domains? expand_more

No, Yahoo's free SMTP service only allows sending from your Yahoo email address. The 'From' address must match your Yahoo account. If you need to send from a custom domain, consider using a transactional email service like SendGrid, Mailgun, or Amazon SES, which are designed for this purpose and offer proper domain authentication (SPF, DKIM, DMARC).

What happens if I disable 2FA? expand_more

If you disable Two-Factor Authentication on your Yahoo account, all your App Passwords will be automatically revoked and stop working. You'll need to re-enable 2FA and generate new App Passwords for your applications. We recommend keeping 2FA enabled for security - it protects your account even if your password is compromised.

Need Higher Sending Limits?

Yahoo Mail's sending limits are designed for personal use. For business email campaigns, use a professional email service with higher limits, better deliverability, and analytics.