-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathmain.go
41 lines (32 loc) · 882 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"active_apple/mailmaster"
. "active_apple/ml/strings"
"log"
)
func main() {
//返回一个带用户名密码,socket连接等指针结构体
mm := mailmaster.NewMailMaster(String("[email protected]"), String("72575144"))
defer mm.Close()
//尝试登录163邮箱
mm.Login()
//不知道原因
mids := mm.ListMessages("00011230080543:")
//获取邮件信息
mailInfos := mm.GetMessageInfos(mids)
//循环邮件信息
for index := range mailInfos {
log.Println("ffffffffffffff")
info := mailInfos.Map(index)
// msg := mm.AsyncReadMessage(String(info.Get("mid").(string)), "both", true)
msg := mm.AsyncReadMessage(String(info["mid"].(string)), "both", true)
text := msg.Map("text")
if text == nil {
continue
}
content := text["content"]
if content == nil {
continue
}
}
}