Guide

How to Send Email from the Manus AI Sandbox

The Manus sandbox is a powerful isolated environment for running AI agent tasks, but it has no built-in email capability. This guide shows you how to install Nylas CLI inside the sandbox, authenticate with the Nylas API, and send email to any address — including external recipients — without relying on sandbox SMTP.

By Aaron de Mello

Why can't Manus send email by default?

Manus runs every task inside an isolated Ubuntu sandbox. This sandbox has a full Linux userspace with shell access, Python, Node.js, and outbound HTTPS connectivity. However, it does not include a mail server, SMTP client, or any pre-configured email credentials. Direct SMTP connections on ports 25, 465, and 587 are blocked by the sandbox's network policy.

This means common approaches like sendmail, mailx, or Python's smtplib will not work out of the box. You need a tool that sends email over HTTPS instead of raw SMTP. That is exactly what Nylas CLI does — it routes messages through the Nylas API, which handles authentication, delivery, and provider compatibility on the server side.

What do you need before starting?

Before installing Nylas CLI in the Manus sandbox, you need two things: a Manus account and a Nylas API key. Both have free tiers that cover everything in this guide. Gather these credentials before opening your Manus chat.

  1. A Manus account — sign up at manus.im. The free plan includes enough credits to follow this guide.
  2. 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).

How do I install Nylas CLI inside the Manus sandbox?

Installing Nylas CLI in the Manus sandbox takes one command. The install script auto-detects the sandbox's Linux architecture, downloads the latest release from GitHub, verifies the SHA-256 checksum, and places the binary on your PATH. No root access or package manager is required.

Open a Manus chat and run:

curl -fsSL https://cli.nylas.com/install.sh | bash

Verify the installation:

nylas --version

You should see output like:

nylas version 1.5.0 (linux/amd64)

If the nylas command is not found after installation, the binary may not be on the sandbox's PATH. Add it manually:

export PATH="$PATH:$HOME/.nylas/bin"

The install script places the binary in ~/.nylas/bin by default. You can also specify a custom directory with the NYLAS_INSTALL_DIR environment variable if needed.

How do I authenticate with the Nylas API?

After installation, you need to configure the CLI with your Nylas API key. The Manus sandbox cannot open a browser, so use nylas auth config (API key auth) instead of nylas auth login (OAuth browser flow). This connects the CLI to your Nylas application and grants, allowing it to send and read email on behalf of your connected mailboxes.

nylas auth config --api-key "your-api-key-here"

Verify the connection:

nylas auth whoami

The whoami command confirms your connection. You should see output like:

Authenticated as: your-email@gmail.com
Grant ID: abc123
Provider: Google

If you have multiple grants (mailboxes) connected to your Nylas application, you can specify which one to use with the --grant-id flag on subsequent commands.

How do I send email from the Manus sandbox?

Once authenticated, sending email is a single command. The --yes flag is required inside the Manus sandbox because the sandbox does not support interactive confirmation prompts. Without it, the command will hang indefinitely waiting for user input.

nylas email send \
  --to "recipient@example.com" \
  --subject "Hello from Manus" \
  --body "This email was sent from the Manus AI sandbox using Nylas CLI." \
  --yes

You can also send to multiple recipients, add CC and BCC, and include HTML content:

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>" \
  --content-type "text/html" \
  --yes

For 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)" \
  --yes

How do I send email to external addresses from the Manus sandbox?

Sending to external addresses works out of the box with Nylas CLI. Unlike tools that rely on the sandbox's local SMTP stack, Nylas CLI sends email through the Nylas API over HTTPS. The API connects to your email provider (Gmail, Outlook, Yahoo, Exchange, etc.) on the server side, so sandbox network restrictions do not apply to email delivery.

There is no difference in syntax between sending to an internal or external address. Every valid email address works:

# 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." --yes

Emails 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 is not limited to sending email. You can read your inbox, search for specific messages, and filter by sender, date, or subject — all from inside the Manus sandbox. Use the --json flag so Manus can parse the structured output and summarize it for you.

List your most recent messages:

nylas email list --limit 20 --json

Search for messages by keyword:

nylas email search "quarterly report" --limit 10 --json

Filter unread messages only:

nylas email list --unread --limit 10 --json

The combination of Nylas CLI read access and the Manus sandbox's compute environment is powerful. 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

There are several approaches developers try when they want to send email from the Manus sandbox. Here is how they compare:

MethodWorks in Sandbox?External Delivery?Setup Complexity
sendmail / mailxNo (not installed)NoN/A
Python smtplibNo (SMTP ports blocked)NoN/A
msmtp with relayNo (SMTP ports blocked)NoN/A
SendGrid / Mailgun APIYes (HTTPS)YesMedium (curl + API key)
Nylas CLIYes (HTTPS)YesLow (one install command)

Nylas CLI is the only option that provides both sending and reading email through a single tool, works across all major providers, and installs with a single command. API-based transactional email services like SendGrid require manual curl requests and only handle outbound delivery.

How do I set up the Nylas CLI Manus Skill for persistent access?

Running install and auth commands manually works for one-off tasks, but if you use email in Manus regularly, setting up the Nylas CLI Skill saves time. The Skill teaches Manus how to install, authenticate, and use every Nylas CLI command automatically. Once added, you activate it with a slash command and the agent handles everything.

  1. Open your Manus dashboard and go to the Skills tab.
  2. Upload the nylas-cli Skill folder (containing SKILL.md and helper scripts).
  3. Open a new Manus chat and type /nylas-cli to activate the Skill.
  4. Ask Manus to run the setup script:
Run bash scripts/setup.sh

The 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?

Most problems sending email from the Manus sandbox fall into a few categories. Here are the most common issues and their fixes, so you can diagnose problems quickly without leaving the sandbox environment.

nylas: command not found

The CLI binary is not on the sandbox PATH. Re-run the install or add it manually:

# Re-install
curl -fsSL https://cli.nylas.com/install.sh | bash

# Or add to PATH manually
export PATH="$PATH:$HOME/.nylas/bin"

Authentication errors

If you see 401 Unauthorized or Invalid API key, your API key is missing or incorrect:

# Check current auth status
nylas auth whoami

# Re-authenticate with a fresh key
nylas auth config --api-key "your-correct-api-key"
nylas auth whoami

Make sure you are using the API key from the correct Nylas application and that the key has not been revoked in the dashboard.

Commands hang or time out

Interactive prompts cause hangs in the Manus sandbox. Always use --yes for send commands and --json for output:

# 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" --yes

Network errors

If you see connection timeouts or DNS resolution failures, the sandbox may have temporary network issues. Test connectivity:

# 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 moment and retry — sandbox network initialization can take a few seconds on cold starts.

Complete workflow: install, authenticate, send

Here is the complete end-to-end workflow you can paste into a Manus chat or run as a script inside the sandbox. It installs Nylas CLI, authenticates, and sends a test email in under 30 seconds:

# Step 1: Install Nylas CLI
curl -fsSL https://cli.nylas.com/install.sh | bash

# Step 2: Add to PATH (if needed)
export PATH="$PATH:$HOME/.nylas/bin"

# Step 3: Authenticate with API key (no browser needed)
nylas auth config --api-key "your-api-key-here"
nylas auth whoami

# Step 4: 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 5: Verify by listing recent sent messages
nylas email list --limit 5 --json

What to explore next

Now that you can send email from the Manus sandbox, explore more advanced workflows:

Frequently asked questions

How do I send email from the Manus sandbox?

Install Nylas CLI with curl -fsSL https://cli.nylas.com/install.sh | bash, authenticate with your Nylas API key, and 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 Nylas CLI automatically. Once added to your Manus dashboard, activate it with /nylas-cli in any chat.