Guide
Send Email from Linux/Manus Sandbox Without SMTP
Send email from a Linux or Manus sandbox over HTTPS when ports 25, 465, and 587 are blocked. No Postfix, no sendmail — Nylas CLI routes the message through the Nylas API.
Written by Nick Barraclough Product Manager
Reviewed by Qasim Muhammad
Why can't Manus send email by default?
Manus cannot send email because its isolated Ubuntu sandbox blocks all 3 standard SMTP ports — 25, 465, and 587 — and ships without a mail server, SMTP client, or email credentials. Any tool that relies on direct SMTP connections, including sendmail, mailx, and Python's smtplib, fails immediately.
The sandbox does allow outbound HTTPS on port 443, which is the only network path available for email delivery. Nylas CLI uses this path — it routes messages through the Nylas API over HTTPS, so the API server handles authentication, delivery, and provider compatibility instead of the sandbox's restricted network stack.
What do you need before starting?
Two things are required before starting: a Manus account and a Nylas API key. Both offer free tiers — the Nylas free plan includes 5 connected grants and up to 10,000 API requests per month, which covers everything in this guide. Gather both credentials before opening the Manus chat.
- A Manus account — sign up at manus.im. The free plan includes enough credits to follow this guide.
- A Nylas API key — sign up at dashboard-v3.nylas.com, create an application, and copy your API key. You also need at least one connected grant (mailbox).
With both credentials ready, install and authenticate the CLI inside the sandbox by following the getting started guide. The Manus sandbox cannot open a browser, so use API-key authentication rather than the OAuth browser flow. Once that's done, the rest of this guide covers sending, reading, and automating email.
How do I send email from the Manus sandbox?
Sending email from the Manus sandbox takes a single nylas email send command after authentication. The CLI sends the message over HTTPS to the Nylas API, which delivers it through your connected provider — Gmail, Outlook, or any other supported mailbox. The entire send-to-delivery cycle typically completes in 1-3 seconds.
The --yes flag is required inside the Manus sandbox because the sandbox does not support interactive confirmation prompts. Without it, the command hangs indefinitely waiting for user input that never arrives:
nylas email send \
--to "recipient@example.com" \
--subject "Hello from Manus" \
--body "This email was sent from the Manus AI sandbox using Nylas CLI." \
--yesThe CLI supports multiple recipients, CC, BCC, and HTML content in a single command. HTML bodies are passed as a string in the --body flag:
nylas email send \
--to "alice@company.com" \
--cc "bob@company.com" \
--bcc "archive@company.com" \
--subject "Weekly Status Update" \
--body "<h1>Status Update</h1><p>All tasks on track this week.</p>" \
--yesFor longer messages, you can write the body to a file first and reference it. This is especially useful when Manus is drafting email content as part of a multi-step workflow:
cat > /tmp/email-body.txt << 'EOF'
Hi team,
Here is the summary of today's meeting:
1. Q1 targets are on track
2. New feature launch is scheduled for next Thursday
3. Support ticket volume is down 15% from last month
Let me know if you have questions.
Best,
Your AI Assistant
EOF
nylas email send \
--to "team@company.com" \
--subject "Meeting Summary — March 16" \
--body "$(cat /tmp/email-body.txt)" \
--yesHow do I send email to external addresses from the Manus sandbox?
External delivery works identically to internal delivery because the Nylas API handles routing on its own servers, not inside the sandbox. The CLI sends your message over HTTPS to the Nylas API, which connects to your email provider (Gmail, Outlook, Yahoo, Exchange) server-side. Sandbox network restrictions never apply to the delivery path.
The Nylas API supports delivery to any valid RFC 5321 email address. There is no syntactic or behavioral difference between sending to an internal domain or a public one — every address goes through the same API endpoint:
# Send to a Gmail address
nylas email send --to "user@gmail.com" --subject "Test" --body "External delivery works." --yes
# Send to a corporate domain
nylas email send --to "contact@acme-corp.com" --subject "Partnership" --body "Reaching out." --yes
# Send to any provider
nylas email send --to "user@protonmail.com" --subject "Hello" --body "No SMTP needed." --yesEmails are delivered from your connected mailbox address, not from the sandbox. Recipients see your real email address as the sender, and replies go to your inbox.
How do I read and search my inbox from the Manus sandbox?
Nylas CLI provides full inbox read access in addition to sending. You can list recent messages, search by keyword, and filter by read status — all from inside the Manus sandbox. The --json flag returns structured output that Manus can parse and summarize automatically, which is useful when processing dozens of messages at once.
List the 20 most recent messages in your inbox. Each result includes the sender, subject, date, and a truncated body preview:
nylas email list --limit 20 --jsonSearch across your entire mailbox by keyword. The Nylas API searches subject lines, body text, and sender/recipient fields, returning up to the specified limit:
nylas email search "quarterly report" --limit 10 --jsonFilter to unread messages only. This is especially useful for triage workflows where Manus processes only new items:
nylas email list --unread --limit 10 --jsonWith Nylas CLI read access inside the Manus sandbox, you can ask Manus to read your inbox, summarize unread messages, draft replies, and send them — all in a single conversation. For a complete inbox management workflow, see the Manus AI Inbox Zero guide.
Manus sandbox email methods compared
Five common methods exist for sending email from a Linux sandbox, but only 2 of them work when SMTP ports are blocked. The table below compares each approach by sandbox compatibility, external delivery support, and setup complexity. Methods that depend on ports 25, 465, or 587 fail immediately in the Manus environment.
| Method | Works in Sandbox? | External Delivery? | Setup Complexity |
|---|---|---|---|
sendmail / mailx | No (not installed) | No | N/A |
Python smtplib | No (SMTP ports blocked) | No | N/A |
msmtp with relay | No (SMTP ports blocked) | No | N/A |
| SendGrid / Mailgun API | Yes (HTTPS) | Yes | Medium (curl + API key) |
| Nylas CLI | Yes (HTTPS) | Yes | Low (one install command) |
Nylas CLI is the only option that provides both sending and reading email through a single tool, works across 6 major providers (Gmail, Outlook, Exchange, Yahoo, iCloud, IMAP), and installs with a single command. API-based transactional email services like SendGrid require manual curl requests with JSON payloads and only handle outbound delivery — they cannot read your inbox.
How do I set up the Nylas CLI Manus Skill for persistent access?
The Nylas CLI Manus Skill eliminates manual setup by packaging install, authentication, and command knowledge into a reusable bundle. Without the Skill, you repeat the same 3 setup commands every time you open a new Manus sandbox session. With the Skill active, Manus runs the setup automatically and translates natural-language prompts into CLI commands.
- Open your Manus dashboard and go to the Skills tab.
- Upload the
nylas-cliSkill folder (containingSKILL.mdand helper scripts). - Open a new Manus chat and type
/nylas-clito activate the Skill. - Ask Manus to run the setup script:
Run bash scripts/setup.shThe setup script installs Nylas CLI, prompts for your API key, and verifies authentication. After setup, every command in this guide works through natural language prompts:
Send an email to alice@company.com with subject "Project Update" and a summary of today's meeting notes.Manus translates the prompt into the correct nylas email send command, fills in the flags, and executes it. For the full Skill file, configuration details, and advanced customization, see the Create a Manus Skill for Email and Calendar guide.
How do I troubleshoot common issues?
Four issues account for most failures when sending email from the Manus sandbox: missing PATH entries, expired API keys, interactive prompt hangs, and transient network errors. Each problem has a specific diagnostic command and a fix you can run without leaving the sandbox.
nylas: command not found
The Manus sandbox sometimes resets environment variables between shell invocations, dropping the install directory from PATH. The binary still exists at ~/.config/nylas/bin/nylas — it just isn't reachable. Add the directory to PATH manually:
export PATH="$PATH:$HOME/.config/nylas/bin"Authentication errors
A 401 Unauthorized or Invalid API key response means the stored API key is missing, expired, or belongs to a different Nylas application. API keys can be revoked from the Nylas dashboard at any time, so always verify the key is still active before debugging further:
# Check current auth status
nylas auth whoami
# Re-authenticate with a fresh key
nylas auth config --api-key "your-correct-api-key"
nylas auth whoamiConfirm the API key matches the application that owns the grant you want to send from. Each Nylas application has its own key, and a key from one application cannot access grants in another.
Commands hang or time out
The Manus sandbox does not support interactive terminal prompts — any command that waits for user confirmation hangs until the sandbox's default timeout (typically 120 seconds). Always pass --yes for send commands and --json for output to prevent this:
# Wrong (will hang)
nylas email send --to "user@example.com" --subject "Test" --body "Hello"
# Correct
nylas email send --to "user@example.com" --subject "Test" --body "Hello" --yesNetwork errors
Connection timeouts or DNS resolution failures usually indicate a transient sandbox networking issue, not a problem with the CLI or API. Sandbox cold starts can take 3-5 seconds to initialize outbound networking. Test connectivity with a simple HTTP status check against the Nylas API endpoint:
# Test HTTPS connectivity to the Nylas API
curl -s -o /dev/null -w "%{http_code}" https://api.us.nylas.com/v3/A 200 or 401 response means the network is working (401 just means no auth header was sent). If you get no response, wait a few seconds and retry — the sandbox's network stack may still be initializing.
Complete workflow: send and verify
Once the CLI is installed and authenticated (see the getting started guide), the send-to-verify cycle runs in 3 steps and completes in under 10 seconds. This script is self-contained — paste it directly into a Manus chat or execute it as a bash script inside any sandbox session.
# Step 1: Ensure the binary is on PATH (sandbox sessions sometimes reset it)
export PATH="$PATH:$HOME/.config/nylas/bin"
# Step 2: Send a test email
nylas email send \
--to "your-email@example.com" \
--subject "Test from Manus Sandbox" \
--body "This email was sent from the Manus AI sandbox using Nylas CLI." \
--yes
# Step 3: Verify by listing recent sent messages
nylas email list --limit 5 --jsonWhat to explore next
Now that you can send email from the Manus sandbox, explore more advanced workflows:
- Manus AI Email Tutorial — the beginner guide to pairing Manus with Nylas CLI, covering send, read, and search.
- Create a Manus Skill for Email and Calendar — build a reusable Skill for persistent email access across Manus sessions.
- Manus AI Inbox Zero — triage, categorize, and draft replies for your entire inbox using Manus.
- Authenticate Gmail on a Headless Server or VM — the same API-key auth pattern for any headless box, not just Manus.
- Nylas CLI Command Reference — every command, flag, and option available in the CLI.
Frequently asked questions
How do I send email from the Manus sandbox?
After installing and authenticating the CLI (see the getting started guide), run nylas email send --to recipient@example.com --subject "Subject" --body "Message" --yes. The --yes flag is required because the Manus sandbox does not support interactive prompts.
Why can't Manus send email by default?
The Manus sandbox is an isolated Ubuntu environment with no mail server, SMTP client, or email credentials. SMTP ports (25, 465, 587) are blocked. You need a tool like Nylas CLI that sends email over HTTPS through an API.
Can I send email to external addresses from the Manus sandbox?
Yes. Nylas CLI sends email through the Nylas API over HTTPS, not through the sandbox's local network. You can send to any valid email address — Gmail, Outlook, Exchange, Yahoo, iCloud, corporate domains, or any other IMAP provider — without hitting sandbox network restrictions.
How do I read and search my inbox from the Manus sandbox?
Use nylas email list --limit 20 --json to read recent messages and nylas email search "your query" --limit 10 --json to search. The --json flag gives Manus structured output it can parse and summarize.
What is the Nylas CLI Manus Skill?
The Nylas CLI Manus Skill is a reusable package of instructions and scripts that teaches Manus how to install, configure, and use it automatically. Once added to your Manus dashboard, activate it with /nylas-cli in any chat.