> For AI agents: the complete documentation index is available at https://www.tteam.icu/llms.txt, the full documentation bundle is available at https://www.tteam.icu/llms-full.txt.

# 邮件服务

```sh file="./mail-provider/setup.sh" title="setup.sh"
docker rm -f mail-provider

docker run -d \
--name mail-provider \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
--restart=always \
-p 4000:4000 \
-v $(pwd)/config/cfg.json:/app/cfg.json \
registry.cn-hangzhou.aliyuncs.com/buyfakett/mail-provider
```

其中 `password` 填写 SMTP 的秘钥。

```json file="./mail-provider/config/cfg.json" title="cfg.json"
{
  "debug": true,
  "http": {
    "listen": "0.0.0.0:4000",
    "token": ""
  },
  "smtp": {
    "addr": "smtp.qq.com:587",
    "username": "buyfakett@vip.qq.com",
    "password": "smtp",
    "from": "buyfakett@vip.qq.com"
  }
}
```

发送邮件示例:

```shell
curl http://127.0.0.1:4000/sender/mail -d "tos=buyfakett@vip.qq.com&subject=svn备份通知&content=111"
```
