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

# Resend

**ResendTools** 使 Agent 能够使用 Resend 发送电子邮件。

## 先决条件

以下示例需要 `resend` 库和来自 [Resend](https://resend.com/) 的 API 密钥。

```shell theme={null}
pip install -U resend
```

```shell theme={null}
export RESEND_API_KEY=***
```

## 示例

以下 Agent 将使用 Resend 发送电子邮件

```python cookbook/tools/resend_tools.py theme={null}
from agno.agent import Agent
from agno.tools.resend import ResendTools

from_email = "<enter_from_email>"
to_email = "<enter_to_email>"

agent = Agent(tools=[ResendTools(from_email=from_email)], show_tool_calls=True)
agent.print_response(f"Send an email to {to_email} greeting them with hello world")
```

## Toolkit 参数

| 参数           | 类型    | 默认 | 说明                    |
| ------------ | ----- | -- | --------------------- |
| `api_key`    | `str` | -  | 用于身份验证的 API 密钥。       |
| `from_email` | `str` | -  | 在电子邮件通信中用作发件人的电子邮件地址。 |

## Toolkit 函数

| 函数           | 说明                    |
| ------------ | --------------------- |
| `send_email` | 使用 Resend API 发送电子邮件。 |

## 开发者资源

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