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

# Email

**EmailTools** 允许智能体 (Agent) 向用户发送电子邮件。智能体可以发送带有特定主题和正文的电子邮件给用户。

## 示例

```python cookbook/tools/email_tools.py theme={null}
from agno.agent import Agent
from agno.tools.email import EmailTools

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

agent = Agent(
    tools=[
        EmailTools(
            receiver_email=receiver_email,
            sender_email=sender_email,
            sender_name=sender_name,
            sender_passkey=sender_passkey,
        )
    ]
)

agent.print_response("send an email to <receiver_email>")
```

## Toolkit 参数

| 参数               | 类型    | 默认值 | 描述          |
| ---------------- | ----- | --- | ----------- |
| `receiver_email` | `str` | -   | 接收者的电子邮件地址。 |
| `sender_name`    | `str` | -   | 发件人的名称。     |
| `sender_email`   | `str` | -   | 发件人的电子邮件地址。 |
| `sender_passkey` | `str` | -   | 发件人邮箱的密钥。   |

## Toolkit 函数

| 函数           | 描述                              |
| ------------ | ------------------------------- |
| `email_user` | 使用给定的主题和正文向用户发送电子邮件。目前支持 Gmail。 |

## 开发者资源

* 查看 [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/email.py)
* 查看 [Cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/tools/email_tools.py)
