Email commands let you work with messages in your inboxes without launching the TUI dashboard.
List emails in an inbox.
| Flag | Description |
|---|
--inbox | Specify inbox (uses active inbox if omitted) |
-o json | Output in JSON format |
# List emails in active inbox
# List emails in specific inbox
View email content.
vsb email view [email-id] [flags]
If no email ID is specified, views the most recent email.
Default behavior: Opens the HTML version in your browser. Use flags for other formats.
| Argument | Description |
|---|
email-id | Email ID (optional, uses most recent if omitted) |
| Flag | Description |
|---|
-t, --text | Show plain text only (prints to terminal) |
-r, --raw | Show raw email source (RFC 5322) |
--inbox | Specify inbox |
-o json | Output in JSON format |
# View most recent email (opens HTML in browser)
# View specific email in browser
# View as plain text in terminal
vsb email view e1a2b3 -o json
Subject: Welcome to MyApp
Date: 2024-01-15 14:35:00 UTC
Welcome to MyApp. Click the link below to verify your email:
https://myapp.com/verify?token=abc123
Perform a deep security analysis of an email.
vsb email audit [email-id] [flags]
| Argument | Description |
|---|
email-id | Email ID (optional, uses most recent if omitted) |
| Flag | Description |
|---|
--inbox | Specify inbox |
-o json | Output in JSON format |
# Audit most recent email
vsb email audit e1a2b3 -o json
Subject: Welcome to MyApp
Received: 2024-01-15 14:35:00 UTC
SPF: PASS (domain: myapp.com)
DKIM: PASS (selector: default, domain: myapp.com)
DMARC: PASS (policy: reject)
Cipher Suite: TLS_AES_256_GCM_SHA384
Extract and list URLs from an email.
vsb email url [email-id] [flags]
| Argument | Description |
|---|
email-id | Email ID (optional, uses most recent if omitted) |
| Flag | Description |
|---|
-O, --open N | Open the Nth URL in browser (1=first) |
--inbox | Specify inbox |
-o json | Output in JSON format |
# List URLs in most recent email
# List URLs in specific email
# Open the first URL in browser
vsb email url e1a2b3 -O 1
vsb email url e1a2b3 --open 1
1. https://myapp.com/verify?token=abc123
2. https://myapp.com/unsubscribe
3. https://myapp.com/privacy
List and download email attachments.
vsb email attachment [email-id] [flags]
| Argument | Description |
|---|
email-id | Email ID (optional, uses most recent if omitted) |
| Flag | Description |
|---|
-s, --save N | Download the Nth attachment (1=first) |
-a, --all | Download all attachments |
-d, --dir | Directory to save attachments (default: current directory) |
--inbox | Specify inbox |
-o json | Output in JSON format |
# List attachments from latest email
# List attachments from specific email
vsb email attachment e1a2b3
# Download first attachment
vsb email attachment --save 1
# Download all attachments
vsb email attachment --all
# Download all attachments to specific directory
vsb email attachment --all -d ./downloads
vsb email attachment -o json
Use --save N to download an attachment, or --all to download all
Delete an email.
vsb email delete <email-id> [flags]
vsb email rm <email-id> [flags]
| Argument | Description |
|---|
email-id | Email ID to delete (required) |
| Flag | Description |
|---|
--inbox | Specify inbox |
# Delete email from specific inbox
Wait for an email matching criteria. Designed for CI/CD pipelines and automated testing.
Returns exit code 0 when a matching email is found, 1 on timeout.
| Flag | Description |
|---|
--subject | Exact subject match |
--subject-regex | Subject regex pattern |
--from | Exact sender match |
--from-regex | Sender regex pattern |
--timeout | Maximum time to wait (default: 60s) |
--count | Number of matching emails to wait for (default: 1) |
-q, --quiet | No output, exit code only |
--extract-link | Output first link from email |
--inbox | Specify inbox |
-o json | Output in JSON format |
# Wait for password reset email
vsb email wait --subject-regex "password reset" --timeout 30s
# Wait for email from specific sender
# Extract verification link for CI/CD
LINK=$(vsb email wait --subject "Verify" --extract-link)
# Wait for multiple emails
vsb email wait --count 3 --timeout 120s
# Quiet mode for scripts (exit code only)
vsb email wait --subject "Welcome" --quiet
# JSON output for parsing
Subject: Welcome to MyApp
Received: 2024-01-15T14:35:00Z