Command
nylas email drafts list
List email drafts in your mailbox.
Written by Qasim Muhammad Staff SRE
What does nylas email drafts list do?
The nylas email drafts list command shows all saved drafts across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP accounts. Use --json to pipe draft data into scripts or count drafts programmatically.
Usage
nylas email drafts list [--limit N] [--json]Flags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit(-l) | Maximum number of drafts to return |
| --yes(-y) | Skip confirmations |
Examples
The nylas email drafts list command shows all saved drafts across Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP accounts.
List recent drafts
nylas email drafts list --limit 10Count total drafts
nylas email drafts list --json | jq lengthExample output
ID SUBJECT TO
draft_abc123 Q3 planning alice@example.com
draft_def456 Re: Invoice #482 bob@example.com
2 draftsTroubleshooting
No drafts returned even though they exist in webmail
Some IMAP servers store drafts in a non-standard folder. Check your provider's draft folder naming conventions.
Drafts from a shared mailbox are missing
Shared mailbox drafts require a separate grant. Run nylas auth login for the shared mailbox account.
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 drafts list --help for full help output.