feat: update sendbox UI (#199)

This commit is contained in:
Dream Hunter
2024-05-04 18:58:34 +08:00
committed by GitHub
parent 1d191a091a
commit 26969bebb8
4 changed files with 9 additions and 7 deletions

View File

@@ -120,6 +120,8 @@ api.post('/api/send_mail', async (c) => {
if (body?.personalizations?.[0]?.dkim_private_key) {
delete body.personalizations[0].dkim_private_key;
}
const reqIp = c.req.raw.headers.get("cf-connecting-ip")
body.reqIp = reqIp;
const { success: success2 } = await c.env.DB.prepare(
`INSERT INTO sendbox (address, raw) VALUES (?, ?)`
).bind(address, JSON.stringify(body)).run();