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

Yahoo SMTP Settings: Server, Ports, App Passwords and Common Errors

Yahoo Mail SMTP server and port settings, SSL and STARTTLS choices, why you need an app password, sending limits to expect, common errors and when to move to a dedicated relay for application mail.

KM
Written by Kwame Mensah
Billing and Account Specialist
Reviewed by Mateus Oliveira
  • Published11 Oct 2024
  • Read time6 min
  • Length1,210 words
Share this guide

If you want a mail client, a website form or a small script to send through a Yahoo Mail account, you need the right server name, port, security mode and credentials. Getting one of these wrong produces vague errors, and a surprising number of failures come from using the account password where Yahoo expects an app password. This guide lists the settings, explains each one and covers troubleshooting.

It also explains when a consumer mailbox is the wrong tool for the job, because applications that send customer mail need higher limits, authentication under your own domain and delivery data that a personal account cannot provide.

Serversmtp.mail.yahoo.com
Ports465 with SSL/TLS, or 587 with STARTTLS
UsernameYour full Yahoo email address
PasswordAn app password generated in your Yahoo account security settings, not your normal password

Settings can change. Confirm them against Yahoo's current help pages before you rely on them.

Outgoing (SMTP) settings

SettingValueNotes
SMTP serversmtp.mail.yahoo.comOutgoing mail host
Port with implicit TLS465Connection is encrypted from the start (SSL/TLS)
Port with STARTTLS587Connection starts in plain text and upgrades to TLS before login. See choosing ports
AuthenticationRequiredUse the login below
UsernameFull address, for example [email protected]Not just the part before the @
PasswordApp passwordGenerate one in Account security
From addressMust match the authenticated accountYahoo may rewrite or reject other senders

Incoming settings (for reading mail)

ProtocolServerPortSecurity
IMAPimap.mail.yahoo.com993SSL/TLS
POP3pop.mail.yahoo.com995SSL/TLS

SMTP only sends. To read mail in a client you also configure IMAP or POP3. See SMTP, IMAP and POP3 compared.

Create an app password

  1. Sign in to your Yahoo account and open the account security page.
  2. Make sure two-step verification is on, which Yahoo may require before app passwords are offered.
  3. Choose the option to generate an app password and give the app a recognisable name, for example the script or client that will use it.
  4. Copy the password shown. It is displayed once; store it in a secret manager or your client configuration, not in source code or a shared document.
  5. Use this app password in the SMTP password field.
  6. If you stop using the application, revoke the app password.

Never post the app password in a support request, a chat or a public repository. If you suspect exposure, revoke it and generate a new one.

Example configurations

# PHP (PHPMailer)
$mail->isSMTP();
$mail->Host       = 'smtp.mail.yahoo.com';
$mail->SMTPAuth   = true;
$mail->Username   = '[email protected]';
$mail->Password   = getenv('YAHOO_APP_PASSWORD');
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;  // port 465
$mail->Port       = 465;

# Python (smtplib)
import smtplib, os
with smtplib.SMTP_SSL('smtp.mail.yahoo.com', 465) as s:
    s.login('[email protected]', os.environ['YAHOO_APP_PASSWORD'])
    s.sendmail('[email protected]', ['[email protected]'], msg.as_string())

See sending with Python smtplib for more complete examples including STARTTLS on port 587.

Sending limits and behaviour to expect

  • Consumer accounts have daily and per-message limits on recipients and total sends. Yahoo publishes figures that can change, so check its current help pages.
  • Sending many similar messages in a short time can trigger temporary blocks.
  • Attachments are limited in size. See attachment limits.
  • Messages sent through the account carry Yahoo's authentication for the yahoo domain, so you cannot sign them with your own domain.
  • Delivery data such as per-message events is not provided in a developer-friendly form.
  • Forwarded or scripted bulk mail can lead to the account being restricted.

Common errors and fixes

SymptomLikely causeFix
Authentication failed (535 style error)Used the normal password, wrong username or revoked app passwordGenerate a new app password and use the full address. See 535 authentication failed
Connection timed outNetwork blocks the port or the wrong hostTry the other port; test with a tool. See testing SMTP connections
SSL or TLS handshake errorWrong security mode for the portUse SSL/TLS with 465 or STARTTLS with 587
Sender address rejectedFrom address differs from the accountSend from the authenticated address
Message deferred or temporarily blockedRate or reputation limitsSlow down and retry later. See 451 temporary errors
Mail lands in spamContent or sending patternReview content; consider a proper sending domain. See spam troubleshooting
Rejected by DMARC at the recipientSpoofing a Yahoo address from another serverDo not send from a yahoo address through other servers. See 550 5.7.1 DMARC rejection

Why not use a consumer mailbox for application mail?

ConcernConsumer mailboxDedicated SMTP relay
DomainYahoo domain onlyYour own domain with SPF, DKIM and DMARC
LimitsLow and subject to changeDesigned for volume
ReputationShared with all consumersManaged per domain or IP
Events and logsMinimalDelivery, bounce and complaint events
Suppression handlingManualAutomatic
Support for APIsNoYes. See API reference
CompliancePersonal use termsBusiness terms

A consumer mailbox is fine for a personal client or a one-off notice. For anything customers depend on, such as receipts, password resets and notifications, use a relay on your own authenticated domain. See authenticating your domain and what an SMTP relay is.

Receiving Yahoo recipients as a sender

If you send to Yahoo addresses, Yahoo applies bulk-sender requirements for authentication, low complaint rates and easy unsubscription. See bulk sender requirements and the Yahoo complaint feedback loop.

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 you can reach the port from your network; some office and home networks block outgoing connections on certain ports, and cloud hosts often restrict port 25. Second, confirm that the encryption mode matches the port: implicit TLS on 465, STARTTLS on 587. Third, check the credentials with a tool that prints the server responses, so you can see whether the login is accepted. Fourth, send a plain text message to a test address before adding HTML, attachments or large recipient lists. If the login works but the message is refused, the reply text usually explains why.

Keep a record of the exact error message. Vague client errors such as "cannot send" hide the useful detail, while the server reply often names the cause, such as an invalid sender or a rate limit. When you ask for help from a colleague or support team, share the error text and the time of the attempt, never the password.

Running a small server or device

Home servers, scanners, printers and monitoring tools often need a mail account to send alerts. Create a dedicated account for the device rather than using a personal mailbox, give it an app password, limit what it can do and expect occasional authentication failures when the provider changes its security rules. For anything important, send alerts through a relay that you control, so that an expired password on a personal account cannot silence your monitoring.

Security tips

  • Use an app password per application so you can revoke one without affecting others.
  • Keep credentials out of code; use environment variables or a secret store.
  • Prefer encrypted ports only. Do not send credentials over an unencrypted connection.
  • Review account activity regularly.
  • Remove app passwords you no longer use.

For Yahoo, the recipe is simple: smtp.mail.yahoo.com, port 465 with SSL or 587 with STARTTLS, your full address as username and an app password. Use it for personal mail and small tools, and move application mail to an authenticated relay on your own domain.

Move application mail to a proper relay Send from your own domain with SPF, DKIM, DMARC and delivery events.

Explore the SMTP relay

References and further reading

Frequently asked questions

What is the Yahoo SMTP server?

smtp.mail.yahoo.com, with port 465 for SSL/TLS or 587 for STARTTLS.

Do I need an app password for Yahoo SMTP?

Yes, for most third-party apps. Generate one in your account security settings and use it instead of your normal password.

What username do I use?

Your full Yahoo email address.

Can I send bulk email through Yahoo SMTP?

It is not designed for that. Consumer limits apply and application mail is better sent through a dedicated relay.

Why is Yahoo rejecting my email?

Common causes are the wrong password type, a mismatched From address, rate limits or DMARC rejection when spoofing a yahoo address.

Topics#yahoo#smtp settings#app password#ports#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