Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

fixed bugs.

Jack8a6cef471f6b
diff --git a/core/internal/controller/mail_boxes/mail_boxes_v1_get_mailbox.go b/core/internal/controller/mail_boxes/mail_boxes_v1_get_mailbox.go
index ca8f505d..713c6214 100644
--- a/core/internal/controller/mail_boxes/mail_boxes_v1_get_mailbox.go
+++ b/core/internal/controller/mail_boxes/mail_boxes_v1_get_mailbox.go
@@ -33,8 +33,7 @@ func (c *ControllerV1) GetMailbox(ctx context.Context, req *v1.GetMailboxReq) (r
// Handle sensitive information
for i := range mailboxList {
- mailboxList[i].Password = ""
- mailboxList[i].PasswordEncode = ""
+ mailboxList[i].Password, _ = mail_boxes.PasswdDecode(ctx, mailboxList[i].PasswordEncode)
}
res.Data.Total = total
diff --git a/core/internal/service/mail_boxes/mail_boxes.go b/core/internal/service/mail_boxes/mail_boxes.go
index 1acc588f..ff41ae13 100644
--- a/core/internal/service/mail_boxes/mail_boxes.go
+++ b/core/internal/service/mail_boxes/mail_boxes.go
@@ -63,7 +63,7 @@ func Delete(ctx context.Context, email string) error {
}
func Get(ctx context.Context, domain, keyword string, page, pageSize int) ([]v1.Mailbox, int, error) {
- m := g.DB().Model("mailbox").Where("domain", domain)
+ m := g.DB().Model("mailbox").Where("domain", domain).Order("create_time", "desc")
if keyword != "" {
m = m.WhereLike("username", fmt.Sprintf("%%%s%%", keyword))