Guide
Send Yahoo Mail from the CLI
Yahoo's SMTP setup requires app-specific passwords, port 465/587 configuration, and constant troubleshooting when Yahoo blocks third-party logins. The Nylas CLI sends Yahoo Mail using OAuth2 through the Nylas API — no SMTP, no app passwords, no smtp.mail.yahoo.com config. Works across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP with 72+ commands and built-in OAuth2.
Written by Nick Barraclough Product Manager
Reviewed by Caleb Geene
Why Yahoo Mail sending is harder than it looks
Over 20 million AT&T, Verizon, and BellSouth email accounts run on Yahoo's backend. If you have an @att.net, @sbcglobal.net, @bellsouth.net, or @verizon.net address, you're sending through Yahoo's infrastructure whether you know it or not. That means Yahoo's sending limits (500 recipients/day, 25 MB attachments) and Yahoo's SMTP quirks apply to all of them.
Since 2020, Yahoo requires app-specific passwords for any third-party SMTP access. You generate one from your account security settings, configure smtp.mail.yahoo.com on port 465 or 587, and hope Yahoo doesn't flag the connection from an unfamiliar IP. The CLI bypasses all of this by sending through the Nylas API with OAuth2 — no SMTP server, no app passwords, no port configuration.
1. Install
Run brew install nylas/nylas-cli/nylas (other methods). Unlike Yahoo's SMTP which requires app-specific passwords from Account Security settings, the CLI handles authentication through OAuth.
2. Authenticate your Yahoo account
Create an application at dashboard-v3.nylas.com, connect your Yahoo mailbox, and grab your API key. Then:
nylas auth config
# Paste your API key when prompted
# Verify the connection
nylas auth whoamiThe output confirms your Yahoo account is connected:
Authentication Status
Current Account:
Email: you@yahoo.com
Provider: yahoo
Grant ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Status: ✓ Valid
Configuration:
Region: us
Config Path: ~/.config/nylas/config.yaml
Secret Store: system keyring3. Send a basic email
Pass --yes to skip the confirmation prompt in scripts.
nylas email send \
--to "friend@example.com" \
--subject "Quick update" \
--body "Hey — just wanted to share the notes from today." \
--yes4. Attachments, HTML, and CC/BCC
Yahoo's 25 MB attachment limit applies. Use --attach for files, --html for formatted messages, and --cc/--bcc for additional recipients. Each message supports up to 100 recipients across all fields combined.
# Attachments (repeat --attach for multiple files)
nylas email send \
--to colleague@company.com \
--subject "Q1 report" \
--body "See attached." \
--attach report.pdf --attach budget.xlsx
# HTML email
nylas email send \
--to team@company.com \
--subject "Sprint summary" \
--html "<h2>Sprint 14</h2><p>Completed <strong>12 of 14</strong> stories.</p>"
# CC and BCC
nylas email send \
--to alice@team.com \
--cc bob@team.com \
--bcc manager@team.com \
--subject "Design review" \
--body "Notes from today's session."5. Schedule email for later
Queue a message now and let the Nylas API deliver it at the scheduled time. Useful for staying under Yahoo's 500-recipient daily limit when batch sending.
# Send in 2 hours
nylas email send \
--to client@example.com \
--subject "Follow-up" \
--body "Checking in on the proposal." \
--schedule 2h
# Send on a specific date
nylas email send \
--to client@example.com \
--subject "Renewal notice" \
--body "Your subscription renews next week." \
--schedule "2026-04-01 08:00"6. JSON output for scripting
Every command supports --json output. Pipe it into jq or feed it to another tool:
# Send and get structured output
nylas email send \
--to user@example.com \
--subject "Automated report" \
--body "Generated by CI pipeline." \
--yes --json | jq '.id'
# Bulk send from a CSV
while IFS=, read -r email name; do
nylas email send \
--to "$email" \
--subject "Hi $name" \
--body "Your account is ready." \
--yes
sleep 2
done < contacts.csvYahoo SMTP vs Nylas CLI
Here's what changes when you switch from Yahoo's SMTP to the Nylas CLI:
| Feature | Yahoo SMTP | Nylas CLI |
|---|---|---|
| Server config | smtp.mail.yahoo.com:465 | None required |
| Authentication | App-specific password | OAuth2 (automatic) |
| Token refresh | Manual | Automatic |
| Blocked logins | Frequent from new IPs | Not applicable |
| Attachments | Manual MIME encoding | --attach file.pdf |
| HTML email | Manual headers | --html flag |
| Scheduled send | Not supported | --schedule flag |
| JSON output | Not supported | --json flag |
| Read inbox | Separate IMAP config | Same CLI |
| Calendar access | Not available | Built-in |
Yahoo-specific sending details
Sending limits
According to Yahoo's sending guidelines, free Yahoo Mail accounts have three hard limits:
| Limit | Value | What happens when exceeded |
|---|---|---|
| Recipients per day | 500 | Sending blocked for 24 hours |
| Recipients per message | 100 (To + CC + BCC combined) | Message rejected immediately |
| Attachment size | 25 MB per message | Message rejected immediately |
The 24-hour block is a rolling window, not a calendar day reset. If you're batch sending from a script, track your recipient count and add a sleep 2 between sends to avoid hitting rate limits.
AT&T, Verizon, and BellSouth accounts
Addresses ending in @att.net, @sbcglobal.net, @bellsouth.net, and @verizon.net all route through Yahoo's mail infrastructure. AT&T partnered with Yahoo in 2017, and Verizon's acquisition of Yahoo merged its email service the same year. Connect these accounts as Yahoo accounts during authentication — the CLI detects the provider and routes through the correct OAuth2 flow.
# Works the same for @att.net, @sbcglobal.net, @bellsouth.net, @verizon.net
nylas email send \
--to recipient@example.com \
--subject "From my ATT account" \
--body "Sent through Yahoo's backend via the Nylas API."Yahoo Mail aliases and disposable addresses
Yahoo lets you create up to 500 disposable addresses (aliases) from Settings > Security > Manage disposable addresses. These follow the pattern basename-keyword@yahoo.com. By default, the CLI sends from your primary Yahoo address. To send from an alias, configure it as a connected sending identity in the Nylas dashboard. Replies to alias-sent emails still land in your main inbox.
Why the CLI doesn't need app-specific passwords
Since 2020, Yahoo requires app-specific passwords for any SMTP or IMAP connection. You generate one from Account Info > Security > Generate app password, then plug it into your mail client. The password is a 16-character string that's easy to lose and impossible to remember. The CLI sidesteps this entirely by authenticating through OAuth2 — Yahoo grants a scoped token that auto-refreshes without storing any passwords locally.
Troubleshooting Yahoo sends
"550 Message rejected" or sending suddenly stops
This almost always means you've hit the 500-recipient daily limit. Yahoo blocks sending for up to 24 hours after the limit trips. There's no way to lift the block early. To check your remaining quota, count the sends in your Yahoo Sent folder for the past 24 hours. If you're batch sending, space messages across multiple days or use multiple grants.
Emails landing in recipient's spam
Yahoo signs outbound mail with DKIM automatically, but the Nylas API adds its own DKIM signature as the sending relay. If recipients report your messages as spam, check three things:
- Your Yahoo account isn't flagged — log into Yahoo web and check for security alerts
- Your message body doesn't contain URL shorteners (bit.ly, tinyurl) — spam filters flag these heavily
- You're not sending identical body text to hundreds of recipients — Yahoo's outbound filters detect bulk patterns
Authentication errors during Yahoo mailbox connection
If Yahoo's OAuth consent screen shows "Something went wrong" while you connect the mailbox in the Nylas dashboard, your Yahoo account may have two-step verification in a broken state. Re-enable two-step verification from Account Info > Security, then retry the mailbox connection. AT&T accounts occasionally need you to log into currently.att.yahoo.com first to unblock the OAuth flow.
Delayed delivery (5-15 minute lag)
Yahoo throttles outbound delivery when it detects rapid sending patterns. If you send 50+ emails in under a minute, subsequent messages may queue for 5-15 minutes before delivery. Adding sleep 2 between sends in a loop prevents this throttle from kicking in.
Next steps
- Send email from the command line — the general guide covering all providers
- List Yahoo Mail from terminal — read and search your Yahoo inbox
- Manage Yahoo Calendar from terminal — events, scheduling, and reminders
- Give AI agents email access via MCP — connect Claude, Cursor, or VS Code to your mailbox
- Full command reference — every flag and subcommand documented