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