pop3连接删除邮件不起作用
cy99 opened this issue · comments
如题,python poplib server.dele(id)
另外问一下作者,后台api账号密码在哪里设置?似乎pop3账号密码和web登录账号密码相同,但是使用api login的时候报错,谢谢!
[error][2024-06-26 17:52:07][c0a80a03667be4bffb943700d60e7fb0][/home/cy/Desktop/PMail/server/pop3_server/action.go:322]sql: converting argument $1 type: unsupported type []int64, a slice of int64
func (a action) Quit(session *gopop.Session) error {
log.WithContext(session.Ctx).Debugf("POP3 CMD: QUIT ")
if len(session.DeleteIds) > 0 {
idsStr := make([]string, len(session.DeleteIds))
for i, id := range session.DeleteIds {
idsStr[i] = fmt.Sprintf("%d", id)
}
query := fmt.Sprintf("UPDATE email SET status=3 WHERE id IN (%s)", strings.Join(idsStr, ","))
_, err := db.Instance.Exec(db.WithContext(session.Ctx.(*context.Context), query))
if err != nil {
log.WithContext(session.Ctx.(*context.Context)).Errorf("%+v", err)
}
}
return nil
}
这样修改就可以了