# QQ 邮箱 (QQ Mail) IMAP/SMTP 配置

## 开启 IMAP/SMTP

1. 登录 https://mail.qq.com
2. 设置 → 账户 → POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务
3. 开启 IMAP/SMTP 服务
4. 按提示发送短信验证，获取 **16位授权码**（不是 QQ 密码）

## 服务器信息

| 服务 | 地址 | 端口 | 加密 |
|------|------|------|------|
| IMAP | imap.qq.com | 993 | TLS |
| SMTP | smtp.qq.com | 465 | TLS |

## Himalaya 配置示例

```toml
[accounts.qq]
email = "your_qq_number@qq.com"
display-name = "Your Name"
default = true

backend.type = "imap"
backend.host = "imap.qq.com"
backend.port = 993
backend.encryption.type = "tls"
backend.login = "your_qq_number@qq.com"
backend.auth.type = "password"
backend.auth.cmd = "echo YOUR_16CHAR_AUTH_CODE"

message.send.backend.type = "smtp"
message.send.backend.host = "smtp.qq.com"
message.send.backend.port = 465
message.send.backend.encryption.type = "tls"
message.send.backend.login = "your_qq_number@qq.com"
message.send.backend.auth.type = "password"
message.send.backend.auth.cmd = "echo YOUR_16CHAR_AUTH_CODE"
```

## 安全提醒

授权码以明文 `echo` 方式存在配置文件中不安全。建议改用 `pass` 或系统 keyring 存储。
