Guide

Yahoo Mail CLI: Send Email from Terminal

Use a Yahoo Mail CLI to send email from terminal without SMTP config or app passwords. Yahoo Mail enforces a 500-recipient daily send cap and message-size limits on every account, applied at the SMTP layer.

Written by Nick Barraclough Product Manager

Reviewed by Caleb Geene

VerifiedCLI 3.1.1 · Yahoo Mail · last tested April 11, 2026

How do you use a Yahoo Mail CLI to send email from terminal?

Authenticate Yahoo Mail once, then send with nylas email send --to recipient@example.com --subject "Hello" --body "Hi" --yes. This gives you a Yahoo Mail CLI send workflow over HTTPS without configuring smtp.mail.yahoo.com, app-specific passwords, or SMTP ports.

Yahoo Mail sending is harder than it looks when scripts go through SMTP directly.

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

Installing the Nylas CLI takes under 30 seconds on macOS or Linux with Homebrew. The single binary weighs roughly 25 MB and has no runtime dependencies — unlike Yahoo SMTP clients that need separate TLS libraries and credential stores for app-specific passwords.

Run brew install nylas/nylas-cli/nylas to install via Homebrew. For Windows PowerShell, Linux without Homebrew, or Go-based installs, see the getting started guide covering all four install methods.

2. Authenticate your Yahoo account

Yahoo authentication through the Nylas CLI uses OAuth2 instead of the 16-character app-specific passwords that Yahoo's SMTP requires. The OAuth2 token auto-refreshes every 3,600 seconds, so you authenticate once and the CLI maintains the session without manual credential rotation.

Create an application at dashboard-v3.nylas.com, connect your Yahoo mailbox, and copy your API key. Then run nylas auth config to store the key locally. The CLI saves credentials in your system keyring rather than a plaintext config file.

nylas auth config
# Paste your API key when prompted

# Verify the connection
nylas auth whoami

The output confirms your Yahoo account is connected and shows the grant ID assigned to this mailbox:

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 keyring

3. Send a basic email

Sending email through the Nylas CLI requires a single command with the recipient, subject, and body as flags. The CLI sends via the Nylas API over HTTPS on port 443, avoiding Yahoo's SMTP ports (465 and 587) entirely. Messages typically reach the recipient's inbox in under 5 seconds.

The --yes flag skips the interactive confirmation prompt, which is necessary for unattended scripts and cron jobs. Without it, the CLI asks you to confirm before sending.

nylas email send \
  --to "friend@example.com" \
  --subject "Quick update" \
  --body "Hey — just wanted to share the notes from today." \
  --yes

4. HTML bodies and CC/BCC

Yahoo Mail enforces a combined cap of 100 recipients across To, CC, and BCC fields. The CLI accepts plain text or HTML through --body, so formatted Yahoo Mail sends do not need a separate --html flag or manual MIME headers.

Use --cc and --bcc for additional recipients. If a workflow needs to deliver files, upload the file to your document system and send the link in the body, or use the Nylas API/SDK path for MIME attachments.

# HTML email through --body
nylas email send \
  --to team@company.com \
  --subject "Sprint summary" \
  --body "<h2>Sprint 14</h2><p>Completed <strong>12 of 14</strong> stories.</p>" \
  --yes

# 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

The Nylas CLI can queue a Yahoo Mail message for delivery at a future time, up to 30 days ahead. This is useful for spreading batch sends across multiple 24-hour windows to stay under Yahoo's 500-recipient daily cap — for example, scheduling 200 messages today and 200 tomorrow instead of hitting the limit in one burst.

Pass --schedule with either a relative duration like 2h or an absolute timestamp in YYYY-MM-DD HH:MM format. The Nylas API holds the message server-side and delivers it at the specified time.

# 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

The --json flag makes every Nylas CLI command return structured JSON instead of human-readable text. The JSON response includes the message ID, thread ID, and delivery timestamp — fields you need for tracking sends in CI pipelines or logging systems. Combined with jq, you can extract specific fields and chain them into downstream scripts.

The bulk send example reads a CSV file line-by-line and sends one email per row. A 2-second delay between sends prevents Yahoo's outbound throttle, which kicks in after roughly 50 messages per minute.

# 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.csv

Yahoo SMTP vs Nylas CLI

Yahoo's SMTP setup requires configuring smtp.mail.yahoo.com on port 465 with TLS, generating a 16-character app-specific password, and handling token expiration manually. The Nylas CLI replaces those 4 configuration steps with a single OAuth2 flow and adds capabilities that SMTP doesn't support at all, including scheduled sends, JSON output, and calendar access through the same binary.

FeatureYahoo SMTPNylas CLI
Server configsmtp.mail.yahoo.com:465None required
AuthenticationApp-specific passwordOAuth2 (automatic)
Token refreshManualAutomatic
Blocked loginsFrequent from new IPsNot applicable
File deliveryManual MIME encodingSend a link, or use the Nylas API/SDK for attachments
HTML emailManual headers--body accepts HTML
Scheduled sendNot supported--schedule flag
JSON outputNot supported--json flag
Read inboxSeparate IMAP configSame CLI
Calendar accessNot availableBuilt-in

Yahoo-specific sending details

Yahoo Mail applies three hard limits to every account: 500 recipients per rolling 24-hour window, 100 recipients per individual message, and 25 MB per attachment. These limits apply identically to AT&T, Verizon, SBCGlobal, and BellSouth addresses that run on Yahoo's backend — over 20 million accounts in total. Understanding these constraints prevents your scripts from triggering Yahoo's automatic sending blocks.

Sending limits

According to Yahoo's sending guidelines, free Yahoo Mail accounts have three hard limits:

LimitValueWhat happens when exceeded
Recipients per day500Sending blocked for 24 hours
Recipients per message100 (To + CC + BCC combined)Message rejected immediately
Attachment size25 MB per messageMessage 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

Yahoo's sending infrastructure returns specific error codes and behaviors when limits are exceeded or authentication fails. The four most common issues — 550 rejections, spam folder placement, OAuth errors, and delivery delays — each have a distinct root cause and fix. About 80% of Yahoo sending failures trace back to the 500-recipient daily limit or a stale OAuth token.

"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