Skip to content

Email Commands

Email commands let you work with messages in your inboxes without launching the TUI dashboard.

List emails in an inbox.

Terminal window
vsb email list [flags]
vsb email ls [flags]
FlagDescription
--inboxSpecify inbox (uses active inbox if omitted)
-o jsonOutput in JSON format
Terminal window
# List emails in active inbox
vsb email list
vsb email ls
# List emails in specific inbox
vsb email list --inbox [email protected]
# Output as JSON
vsb email list -o json
ID SUBJECT FROM RECEIVED
e1a2b3 Welcome to MyApp [email protected] 2 min ago
e4d5f6 Password Reset [email protected] 5 min ago
2 email(s)

View email content.

Terminal window
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.

ArgumentDescription
email-idEmail ID (optional, uses most recent if omitted)
FlagDescription
-t, --textShow plain text only (prints to terminal)
-r, --rawShow raw email source (RFC 5322)
--inboxSpecify inbox
-o jsonOutput in JSON format
Terminal window
# View most recent email (opens HTML in browser)
vsb email view
# View specific email in browser
vsb email view e1a2b3
# View as plain text in terminal
vsb email view e1a2b3 -t
# View raw email source
vsb email view e1a2b3 -r
# Output as JSON
vsb email view e1a2b3 -o json
Subject: Welcome to MyApp
Date: 2024-01-15 14:35:00 UTC
Hello!
Welcome to MyApp. Click the link below to verify your email:
https://myapp.com/verify?token=abc123
Thanks,
The MyApp Team

Perform a deep security analysis of an email.

Terminal window
vsb email audit [email-id] [flags]
ArgumentDescription
email-idEmail ID (optional, uses most recent if omitted)
FlagDescription
--inboxSpecify inbox
-o jsonOutput in JSON format
Terminal window
# Audit most recent email
vsb email audit
# Audit specific email
vsb email audit e1a2b3
# Output as JSON
vsb email audit e1a2b3 -o json
EMAIL AUDIT REPORT
BASIC INFO
Subject: Welcome to MyApp
Received: 2024-01-15 14:35:00 UTC
AUTHENTICATION
SPF: PASS (domain: myapp.com)
DKIM: PASS (selector: default, domain: myapp.com)
DMARC: PASS (policy: reject)
TRANSPORT SECURITY
TLS Version: TLS 1.3
Cipher Suite: TLS_AES_256_GCM_SHA384
MIME STRUCTURE
message/rfc822
├── headers
│ ├── From
│ ├── To
│ ├── Subject
│ ├── Date
│ └── Message-ID
├── body
│ ├── text/plain
│ └── text/html
Security Score: 100/100

Extract and list URLs from an email.

Terminal window
vsb email url [email-id] [flags]
ArgumentDescription
email-idEmail ID (optional, uses most recent if omitted)
FlagDescription
-O, --open NOpen the Nth URL in browser (1=first)
--inboxSpecify inbox
-o jsonOutput in JSON format
Terminal window
# List URLs in most recent email
vsb email url
# List URLs in specific email
vsb email url e1a2b3
# Open the first URL in browser
vsb email url e1a2b3 -O 1
vsb email url e1a2b3 --open 1
# Output as JSON
vsb email url -o json
1. https://myapp.com/verify?token=abc123
2. https://myapp.com/unsubscribe
3. https://myapp.com/privacy

List and download email attachments.

Terminal window
vsb email attachment [email-id] [flags]
ArgumentDescription
email-idEmail ID (optional, uses most recent if omitted)
FlagDescription
-s, --save NDownload the Nth attachment (1=first)
-a, --allDownload all attachments
-d, --dirDirectory to save attachments (default: current directory)
--inboxSpecify inbox
-o jsonOutput in JSON format
Terminal window
# List attachments from latest email
vsb email attachment
# 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
# Output as JSON
vsb email attachment -o json
Attachments (2):
1. invoice.pdf
Type: application/pdf
Size: 145 KB
2. receipt.png
Type: image/png
Size: 23 KB
Use --save N to download an attachment, or --all to download all

Delete an email.

Terminal window
vsb email delete <email-id> [flags]
vsb email rm <email-id> [flags]
ArgumentDescription
email-idEmail ID to delete (required)
FlagDescription
--inboxSpecify inbox
Terminal window
# Delete email
vsb email delete e1a2b3
vsb email rm e1a2b3
# Delete email from specific inbox
vsb email delete e1a2b3 --inbox [email protected]

Wait for an email matching criteria. Designed for CI/CD pipelines and automated testing.

Terminal window
vsb email wait [flags]

Returns exit code 0 when a matching email is found, 1 on timeout.

FlagDescription
--subjectExact subject match
--subject-regexSubject regex pattern
--fromExact sender match
--from-regexSender regex pattern
--timeoutMaximum time to wait (default: 60s)
--countNumber of matching emails to wait for (default: 1)
-q, --quietNo output, exit code only
--extract-linkOutput first link from email
--inboxSpecify inbox
-o jsonOutput in JSON format
Terminal window
# Wait for any email
vsb email wait
# Wait for password reset email
vsb email wait --subject-regex "password reset" --timeout 30s
# Wait for email from specific sender
vsb email wait --from "[email protected]"
# 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
vsb email wait --from "[email protected]" -o json | jq .subject
Waiting for email on [email protected] (timeout: 60s)...
Subject: Welcome to MyApp
Received: 2024-01-15T14:35:00Z
Links: 3 found