From 1563f1dc157d70d82a1db70cd3fa88a8a68fd369 Mon Sep 17 00:00:00 2001
From: taoshihan1991 <630892807@qq.com>
Date: Mon, 1 Jun 2020 18:44:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BB=E5=8F=96=E9=82=AE?=
=?UTF-8?q?=E4=BB=B6=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
static/html/chat.html | 21 +++++++++++++++
static/html/login.html | 60 ++++++++++++++++++++++++++++--------------
tools/imap.go | 12 ++++-----
3 files changed, 66 insertions(+), 27 deletions(-)
create mode 100644 static/html/chat.html
diff --git a/static/html/chat.html b/static/html/chat.html
new file mode 100644
index 0000000..1484000
--- /dev/null
+++ b/static/html/chat.html
@@ -0,0 +1,21 @@
+
+
+
+
-
- 邮箱网页版IMAP工具
-
-
-
-
-
-
-
-
-
-
- 立即登录
- 重置
-
-
+ 登录页
+
+
+
+
+
+
+
+
+
+
+ 本地验证
+ 设置账户
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IMAP验证
+
+
+
+
+
© 2020
@@ -69,6 +87,8 @@
new Vue({
el: '#app',
data: {
+ window:window,
+ activeName:"first",
loading:false,
ruleForm:{
server:'',
diff --git a/tools/imap.go b/tools/imap.go
index a35ec1e..e83597c 100644
--- a/tools/imap.go
+++ b/tools/imap.go
@@ -166,7 +166,7 @@ func GetMessage(server string, email string, password string, folder string, id
seqSet.AddNum(id)
// Get the whole message body
- var section imap.BodySectionName
+ section:= &imap.BodySectionName{}
items := []imap.FetchItem{section.FetchItem()}
messages := make(chan *imap.Message, 1)
@@ -181,23 +181,21 @@ func GetMessage(server string, email string, password string, folder string, id
log.Fatal("Server didn't returned message")
}
- r := msg.GetBody(§ion)
+ r := msg.GetBody(section)
+
if r == nil {
log.Fatal("Server didn't returned message body")
}
var mailitem = new(MailItem)
// Create a new mail reader
- mr, err := mail.CreateReader(r)
+ mr, _ := mail.CreateReader(r)
- if err != nil {
- return mailitem
- }
// Print some info about the message
header := mr.Header
date, _ := header.Date()
- log.Println("Date:", date)
+
mailitem.Date = date.String()
var f string