VOOZH about

URL: https://cli.nylas.com/docs/commands/email-send

⇱ nylas email send command | Nylas CLI


What does nylas email send do?

The nylas email send command sends an email through Gmail, Outlook, Exchange, Yahoo, iCloud, or any IMAP server from your terminal. It supports scheduling with natural language expressions (e.g., 2h, tomorrow 9am), GPG signing and encryption via RFC 3156 PGP/MIME, and open/click tracking with webhook delivery. Use --yes to skip confirmation for scripting and agent automation.

Usage

nylas email send --to EMAIL --subject SUBJECT --body BODY [options]

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limitLimit results (most list commands)
--yes(-y)Skip confirmations
--toRecipient email address
--ccCC recipients
--bccBCC recipients
--subjectEmail subject
--bodyEmail body (HTML or plain text)
--scheduleSchedule send (e.g. 2h, tomorrow 9am)
--signSign with GPG
--encryptEncrypt with recipient's GPG key
--track-opensTrack email opens
--track-linksTrack link clicks
--metadataCustom key=value metadata (repeatable)
--gpg-keySpecific GPG key ID to use for signing
--interactive(-i)Interactive mode
--list-gpg-keysList available GPG signing keys and exit
--recipient-keySpecific GPG key ID for encryption (auto-detected from recipient email if not specified)
--render-onlyRender a hosted template preview without sending
--reply-toMessage ID to reply to
--signature-idStored signature ID to append when sending
--template-dataInline JSON object with hosted template variables
--template-data-filePath to a JSON file with hosted template variables
--template-grant-idGrant ID or email for grant-scoped hosted templates
--template-idHosted template ID to render and send
--template-scopeHosted template scope: app or grant
--template-strictFail if a hosted template references missing variables
--track-labelLabel for tracking (used to group tracked emails)

Examples

Basic send

nylas email send --to user@example.com --subject "Quick note" --body "Hello!" --yes

Schedule for later

nylas email send --to team@company.com --subject "Reminder" --body "..." --schedule 2h

GPG signed and encrypted

nylas email send --to legal@partner.com --subject "Contract" --body "..." --sign --encrypt

Example output

✓ Email sent
 Message ID: msg_abc123
 To: alice@example.com
 Subject: Q3 planning

Troubleshooting

Send fails with auth error

Run nylas auth config and nylas auth login to connect an account.

GPG encrypt fails

Ensure recipient has a public key. Use nylas email send --list-gpg-keys to verify your keys.

Related commands

nylas email ai analyze

Analyze recent emails with AI for a summary, categorization, and action items.

nylas email attachments download

Download an attachment

nylas email attachments list

List all attachments on a specific email.

nylas email delete

Delete an email by message ID.

nylas email drafts create

Create a new draft email with optional attachments.

nylas email drafts list

List email drafts in your mailbox.

Recommended guides

List Fastmail emails from the CLI

List Fastmail emails from the CLI through Nylas IMAP access, using app passwords, inbox filters, JSON output, and Fastmail-specific auth troubleshooting.

Why Cloud Servers Block SMTP Ports

AWS, GCP, and Azure block outbound SMTP port 25 while ports 587 and 465 stay open. Confirm the block and send email over an HTTPS API instead.

Send Email From a Docker Container

Cloud providers block SMTP port 25 from containers. Send email over an HTTPS API on port 443 with one command and no mail daemon at all.

MailerSend vs Nylas: Email Compared

MailerSend sends transactional email from verified domains. Nylas reads and syncs user inboxes across 6 providers. Compare features, pricing, and use cases.

Customer.io vs Nylas: Email Compared

Customer.io sends lifecycle emails to your user base. Nylas reads and sends from real user inboxes via OAuth. Compare use cases, pricing, and AI agent support.

Knock vs Nylas: Notifications vs Email API

Knock delivers multi-channel product notifications via workflows; Nylas provides two-way email and calendar sync. Compare scope, pricing, and agent support.

Run nylas email send --help for full help output.