Tools: Send Email from the Command Line — No SMTP, No Sendmail, No Postfix (2026)
Install
Authenticate
Send an email
Read and search your inbox
Schedule emails for later
GPG sign and encrypt
AI-powered smart compose
Scripting with JSON output
How it compares
Give AI agents email access Every CLI email tool has the same problem: SMTP configuration. mail needs Postfix. mutt needs credentials in a dotfile. msmtp handles sending but not reading. None support OAuth2 for Gmail or Microsoft 365 out of the box. Nylas CLI bypasses all of this. Authenticate once, then send email from Linux, macOS, or Windows with one command. Works with Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP. Sign up at dashboard-v3.nylas.com, create an app, connect your mailbox, grab your API key: Full GPG guide: GPG Encrypted Email from the CLI Every command supports --json for piping into jq or other tools: The CLI includes a built-in MCP server. One command gives Claude Code, Cursor, or Codex CLI full email and calendar tools: Full setup: Give Your AI Coding Agent an Email Address Full guide with tracking, attachments, and scheduling examples: Send Email from the Command Line More guides: cli.nylas.com/guides Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse
# macOS / Linux
-weight: 500;">brew -weight: 500;">install nylas/nylas-cli/nylas # Or shell script (macOS / Linux / WSL)
-weight: 500;">curl -fsSL https://cli.nylas.com/-weight: 500;">install.sh | bash # Windows PowerShell
irm https://cli.nylas.com/-weight: 500;">install.ps1 | iex
# macOS / Linux
-weight: 500;">brew -weight: 500;">install nylas/nylas-cli/nylas # Or shell script (macOS / Linux / WSL)
-weight: 500;">curl -fsSL https://cli.nylas.com/-weight: 500;">install.sh | bash # Windows PowerShell
irm https://cli.nylas.com/-weight: 500;">install.ps1 | iex
# macOS / Linux
-weight: 500;">brew -weight: 500;">install nylas/nylas-cli/nylas # Or shell script (macOS / Linux / WSL)
-weight: 500;">curl -fsSL https://cli.nylas.com/-weight: 500;">install.sh | bash # Windows PowerShell
irm https://cli.nylas.com/-weight: 500;">install.ps1 | iex
nylas auth config
# Paste your API key nylas auth whoami
# => Authenticated as [email protected] (Google Workspace)
nylas auth config
# Paste your API key nylas auth whoami
# => Authenticated as [email protected] (Google Workspace)
nylas auth config
# Paste your API key nylas auth whoami
# => Authenticated as [email protected] (Google Workspace)
nylas email send \ --to "[email protected]" \ --subject "Quarterly report" \ --body "Please review the Q4 numbers before Friday." # Skip confirmation prompt
nylas email send --to [email protected] --subject "Quick note" --body "..." --yes # CC and BCC
nylas email send \ --to [email protected] \ --cc [email protected] \ --bcc [email protected] \ --subject "Sprint -weight: 500;">update" \ --body "All tasks on track."
nylas email send \ --to "[email protected]" \ --subject "Quarterly report" \ --body "Please review the Q4 numbers before Friday." # Skip confirmation prompt
nylas email send --to [email protected] --subject "Quick note" --body "..." --yes # CC and BCC
nylas email send \ --to [email protected] \ --cc [email protected] \ --bcc [email protected] \ --subject "Sprint -weight: 500;">update" \ --body "All tasks on track."
nylas email send \ --to "[email protected]" \ --subject "Quarterly report" \ --body "Please review the Q4 numbers before Friday." # Skip confirmation prompt
nylas email send --to [email protected] --subject "Quick note" --body "..." --yes # CC and BCC
nylas email send \ --to [email protected] \ --cc [email protected] \ --bcc [email protected] \ --subject "Sprint -weight: 500;">update" \ --body "All tasks on track."
# List recent emails
nylas email list --limit 10 # Only unread
nylas email list --unread # Search by keyword
nylas email search "invoice" --limit 5 # Read a specific message
nylas email read msg_abc123
# List recent emails
nylas email list --limit 10 # Only unread
nylas email list --unread # Search by keyword
nylas email search "invoice" --limit 5 # Read a specific message
nylas email read msg_abc123
# List recent emails
nylas email list --limit 10 # Only unread
nylas email list --unread # Search by keyword
nylas email search "invoice" --limit 5 # Read a specific message
nylas email read msg_abc123
# Send in 2 hours
nylas email send --to [email protected] --subject "Reminder" --body "..." --schedule 2h # Send tomorrow morning
nylas email send --to [email protected] --subject "Standup" --body "..." --schedule "tomorrow 9am"
# Send in 2 hours
nylas email send --to [email protected] --subject "Reminder" --body "..." --schedule 2h # Send tomorrow morning
nylas email send --to [email protected] --subject "Standup" --body "..." --schedule "tomorrow 9am"
# Send in 2 hours
nylas email send --to [email protected] --subject "Reminder" --body "..." --schedule 2h # Send tomorrow morning
nylas email send --to [email protected] --subject "Standup" --body "..." --schedule "tomorrow 9am"
# Sign with your key
nylas email send --to [email protected] --subject "Contract" --body "..." --sign # Encrypt with recipient's public key
nylas email send --to [email protected] --subject "Contract" --body "..." --encrypt # Both
nylas email send --to [email protected] --subject "Contract" --body "..." --sign --encrypt
# Sign with your key
nylas email send --to [email protected] --subject "Contract" --body "..." --sign # Encrypt with recipient's public key
nylas email send --to [email protected] --subject "Contract" --body "..." --encrypt # Both
nylas email send --to [email protected] --subject "Contract" --body "..." --sign --encrypt
# Sign with your key
nylas email send --to [email protected] --subject "Contract" --body "..." --sign # Encrypt with recipient's public key
nylas email send --to [email protected] --subject "Contract" --body "..." --encrypt # Both
nylas email send --to [email protected] --subject "Contract" --body "..." --sign --encrypt
# Generate a draft from a prompt
nylas email smart-compose --prompt "Thank them for the meeting and confirm next steps" # Reply to a specific message
nylas email smart-compose --message-id msg_abc123 --prompt "Accept the invitation politely"
# Generate a draft from a prompt
nylas email smart-compose --prompt "Thank them for the meeting and confirm next steps" # Reply to a specific message
nylas email smart-compose --message-id msg_abc123 --prompt "Accept the invitation politely"
# Generate a draft from a prompt
nylas email smart-compose --prompt "Thank them for the meeting and confirm next steps" # Reply to a specific message
nylas email smart-compose --message-id msg_abc123 --prompt "Accept the invitation politely"
# Unread count
nylas email list --unread --json | jq length # Extract senders from recent messages
nylas email list --limit 20 --json | jq -r '.[].from[0].email' # Bulk send from CSV
while IFS=, read -r email name; do nylas email send \ --to "$email" \ --subject "Hello $name" \ --body "Your account is ready." \ --yes sleep 2
done < contacts.csv
# Unread count
nylas email list --unread --json | jq length # Extract senders from recent messages
nylas email list --limit 20 --json | jq -r '.[].from[0].email' # Bulk send from CSV
while IFS=, read -r email name; do nylas email send \ --to "$email" \ --subject "Hello $name" \ --body "Your account is ready." \ --yes sleep 2
done < contacts.csv
# Unread count
nylas email list --unread --json | jq length # Extract senders from recent messages
nylas email list --limit 20 --json | jq -r '.[].from[0].email' # Bulk send from CSV
while IFS=, read -r email name; do nylas email send \ --to "$email" \ --subject "Hello $name" \ --body "Your account is ready." \ --yes sleep 2
done < contacts.csv
nylas mcp -weight: 500;">install --assistant claude-code
nylas mcp -weight: 500;">install --assistant claude-code
nylas mcp -weight: 500;">install --assistant claude-code