feat(config): load mail provider api keys from env

This commit is contained in:
Logic
2026-03-21 15:41:02 +08:00
parent cf20b9acc6
commit 624ca1e1cc
3 changed files with 24 additions and 7 deletions

View File

@@ -49,6 +49,12 @@ SOCKS5_PROXY=socks5://user:pass@host:port
# 临时邮箱服务可选vmail / mailtm / yyds
MAIL_PROVIDER=vmail
# vmail.devMAIL_PROVIDER=vmail 时需要)
VMAIL_API_KEY=your_vmail_api_key
# YYDS MailMAIL_PROVIDER=yyds 时需要)
YYDS_API_KEY=your_yyds_api_key
# YesCaptcha注册功能需要
YESCAPTCHA_API_KEY=your_key_here
@@ -61,9 +67,9 @@ CURRENCY=usd
| Provider | `MAIL_PROVIDER` 值 | 说明 |
|---|---|---|
| vmail.dev | `vmail` | 默认选项;注册时会返回 `mailbox_id`,部分邮箱还会返回 `mailbox_password` |
| mail.tm | `mailtm` | 支持自动创建邮箱并轮询 OTP |
| YYDS Mail | `yyds` | 支持自动创建邮箱并轮询 OTP |
| vmail.dev | `vmail` | 需要 `VMAIL_API_KEY`;注册时会返回 `mailbox_id`,部分邮箱还会返回 `mailbox_password` |
| mail.tm | `mailtm` | 不需要 API key支持自动创建邮箱并轮询 OTP |
| YYDS Mail | `yyds` | 需要 `YYDS_API_KEY`支持自动创建邮箱并轮询 OTP |
> `register` / `checkout` 都支持以上三种 provider。
> `codex-login` 如需自动拉取邮箱 OTP建议优先使用 `vmail` 或 `yyds``mailtm` 当前更适合手动通过 `--otp` 传入验证码。