Skip to content

Commit

Permalink
docs: 修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Dec 26, 2024
1 parent bc5cb4d commit d50692b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mail2telegram
</p>


![](./doc/social-preview.png)
![](./doc/social_preview.png)

This is a Telegram Bot based on Cloudflare Email Routing Worker, which can convert emails into Telegram messages. You can forward emails from recipients with any prefix to the Bot, and then a temporary mailbox Bot with an infinite address will be created.

Expand Down Expand Up @@ -83,7 +83,7 @@ Location: Workers & Pages - your_work_name - Settings - Variables
| GUARDIAN_MODE | Guard mode, default off, if you want to enable it, fill in `true`. |
| MAX_EMAIL_SIZE | Maximum email size in bytes, emails exceeding this size will be processed according to `MAX_EMAIL_SIZE_POLICY`. The main purpose is to prevent the worker function from timing out due to too large attachments. Default is 512*1024. |
| MAX_EMAIL_SIZE_POLICY | The available values are `unhandled`, `truncate` and `continue`. `unhandled` means return the headers without parsing the message body, `truncate` means truncate the message body and only parse the allowed size, `continue` means continue to process the message regardless of the size limit. The default is `truncate`. This policy only affects Telegram push messages, not email forwarding. |
| RESEND_API_KEY | Resend API Key, https://resend.com/docs/introduction, Reply message to resend the email. |
| RESEND_API_KEY | Resend API Key, https://resend.com/docs/introduction, Reply message to reply the email. |
| DB | Bind the database to the worker at the `KV Namespace Bindings` section. The `Variable Name` must be `DB`, and `KV Namespace` select any newly created KV. |


Expand Down
7 changes: 4 additions & 3 deletions doc/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mail2telegram
<em>使用Telegram机器人获取您的临时电子邮件..</em>
</p>

![](./social-preview.png)
![](./social_preview.png)

这是一个基于 Cloudflare Email Routing Worker的 Telegram Bot,能够将邮件转换成telegram消息。你可以将任意前缀的收件人的邮件转发到Bot,然后一个无限地址的临时邮箱Bot就诞生了。

Expand Down Expand Up @@ -68,8 +68,8 @@ mail2telegram
| TELEGRAM_TOKEN | Telegram Bot Token 例如:`7123456780:AAjkLAbvSgDdfsDdfsaSK0` |
| DOMAIN | Workers的域名, 例如: `project_name.user_name.workers.dev` |
| FORWARD_LIST | 备份邮件,可以转发到自己的邮箱备份, 留空则不转发,可以填入多个使用`,`分隔 |
| ~~WHITE_LIST~~ | **即将废弃,改用内置小程序进行编辑**,发件人白名单,一个正则表达式或者邮箱地址数组转成字符串,例:`[\".*@10086\\\\.cn\"]` |
| ~~BLOCK_LIST~~ | **即将废弃,改用内置小程序进行编辑**,发件人黑名单,一个正则表达式或者邮箱地址数组转成字符串 |
| ~~WHITE_LIST~~ | **即将废弃,改用内置小程序进行编辑**,发件人白名单,一个正则表达式或者邮箱地址数组转成字符串,例:`[\".*@10086\\\\.cn\"]` |
| ~~BLOCK_LIST~~ | **即将废弃,改用内置小程序进行编辑**,发件人黑名单,一个正则表达式或者邮箱地址数组转成字符串 |
| MAIL_TTL | 邮件缓存保存时间,单位秒, 默认为一天, 过期之后邮件将无法预览,请注意备份 |
| OPENAI_API_KEY | OpenAI API Key, 用于邮件内容总结,如果不填写则不会出现`Summary`按钮 |
| OPENAI_COMPLETIONS_API | 可自定义API,默认值为 `https://api.openai.com/v1/chat/completions` |
Expand All @@ -78,6 +78,7 @@ mail2telegram
| GUARDIAN_MODE | 守护模式,默认关闭,若要开启则填入`true` |
| MAX_EMAIL_SIZE | 最大邮件大小,单位字节,超过此大小的邮件将会根据`MAX_EMAIL_SIZE_POLICY`判断处理逻辑。主要作用是防止邮件附件过大导致worker函数超时。默认为512*1024 |
| MAX_EMAIL_SIZE_POLICY | 可选值为`unhandled`,`truncate`,`continute``unhandled`表示不处理只返回邮件头信息不解析邮件正文,`truncate`表示截断邮件正文只解析允许的大小,`continute`表示继续处理不管大小限制。默认为`truncate`。这个策略只影响Telegram推送消息,不影响邮件转发。 |
| RESEND_API_KEY | Resend API Key, https://resend.com/docs/introduction, 回复消息以回复电子邮件。 |
| DB | 在下方的 `KV 命名空间绑定` 处将数据库绑定到worker, `变量名称`必须为`DB``KV 命名空间`选新建好的任意KV |


Expand Down
File renamed without changes

0 comments on commit d50692b

Please sign in to comment.