From 58a04c97003357033e89af71e98250b29a466d80 Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Wed, 20 May 2020 19:36:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=8F=91=E9=80=81=E4=BA=BA=E5=92=8C=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/html/list.html | 6 +++--- tools/imap.go | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/static/html/list.html b/static/html/list.html index ca7e843..8eeb5d2 100644 --- a/static/html/list.html +++ b/static/html/list.html @@ -61,11 +61,11 @@
- - + +

<{item.Subject}>

-

王小虎 提交于 2018/4/12 20:46

+

<{item.From}> 发送于 <{item.Date}>

diff --git a/tools/imap.go b/tools/imap.go index db19ce8..4400dd8 100644 --- a/tools/imap.go +++ b/tools/imap.go @@ -135,6 +135,12 @@ func GetFolderMail(server string, email string, password string, folder string, mailitem.Subject = ret mailitem.Id = msg.SeqNum mailitem.Fid = folder + mailitem.Date=msg.Envelope.Date.String() + from:="" + for _,s:=range msg.Envelope.Sender{ + from+=s.Address() + } + mailitem.From=from mailPagelist.MailItems = append(mailPagelist.MailItems, mailitem) } return mailPagelist.MailItems