> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-agui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Email

> Use Email tools with Agno agents

Agno agents can send and process emails with Email tools.

```python theme={null}

from agno.agent import Agent
from agno.tools.email import EmailTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

receiver_email = "<receiver_email>"
sender_email = "<sender_email>"
sender_name = "<sender_name>"
sender_passkey = "<sender_passkey>"

# Example 1: Enable specific email functions
agent = Agent(
    tools=[
        EmailTools(
            receiver_email=receiver_email,
            sender_email=sender_email,
            sender_name=sender_name,
            sender_passkey=sender_passkey,
            enable_email_user=True,
        )
    ]
)

# Example 2: Enable all email functions
agent_all = Agent(
    tools=[
        EmailTools(
            receiver_email=receiver_email,
            sender_email=sender_email,
            sender_name=sender_name,
            sender_passkey=sender_passkey,
            all=True,
        )
    ]
)

# Test the agent

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response(
        "Send an email to the receiver with subject 'Test Email' and a friendly greeting message",
        markdown=True,
    )
```

## Run the Example

```bash theme={null}
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/91_tools

# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate

python email_tools.py
```

For details, see [Email cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/email_tools.py).
