scrape a chase email

This commit is contained in:
bel
2020-04-02 22:03:49 +00:00
parent 7434e49a1f
commit 205879fc3b
5 changed files with 180 additions and 2 deletions

20
main.go
View File

@@ -1,7 +1,23 @@
package main
import "log"
import (
"local/sandbox/contact/contact"
"log"
)
func main() {
log.Println("hello world")
config := NewConfig()
emailer := &contact.Emailer{
IMAP: config.EmailIMAP,
From: config.EmailUser,
Password: config.EmailPass,
}
log.Println(emailer)
emails, err := emailer.Read()
if err != nil {
panic(err)
}
for _, email := range emails {
log.Println(Scrape(email))
}
}