Command
nylas email mark read
Mark an email as read.
Written by Qasim Muhammad Staff SRE
What does nylas email mark read do?
The nylas email mark read command sets the read/seen flag on a message by its ID. Combine with nylas email list --unread and a shell loop to mark all unread messages as read in one pass across Gmail, Outlook, Exchange, and IMAP accounts.
Usage
nylas email mark read <message-id> [grant-id]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 | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
Examples
The nylas email mark read command sets the read/seen flag on a message by its ID.
Mark a single email as read
nylas email mark read msg_abc123Mark all unread emails as read
nylas email list --unread --json | jq -r '.[].id' | while read id; do nylas email mark read "$id"; doneExample output
✓ Message marked as read
Message ID: msg_abc123Troubleshooting
Email marked read but still shows unread in provider
Some providers take a few seconds to sync. Wait and refresh your webmail client.
Message ID not found
Run nylas email list --unread --json to get valid unread message IDs.
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 mark read --help for full help output.