add emailer enabled to config, added todo since its a little wrong

master
Bel LaPointe 2022-01-10 00:26:01 -05:00
parent 70f15434ff
commit f4c4e9cfbc
4 changed files with 8 additions and 2 deletions

View File

@ -14,6 +14,7 @@
"Cookie": ""
}
},
"EmailerEnabled": false,
"Emailer": {
"From": "breellocaldev@gmail.com",
"SMTP": "",

View File

@ -22,6 +22,7 @@ type Config struct {
}
}
Emailer contact.Emailer
EmailerEnabled bool
lock sync.Mutex
db storage.DB

View File

@ -22,6 +22,9 @@ func main() {
go func() {
c := time.NewTicker(time.Minute)
for range c.C {
if !config.Get().EmailerEnabled {
continue
}
lock.Lock()
if err := email(); err != nil {
log.Print(err)

View File

@ -1,5 +1,4 @@
todo:
- read email to state file from local/sandbox/contact/contact
- upload cookies
- download cookies
- encrypt cookies
@ -8,8 +7,10 @@ todo:
- send jobs
- banlist criteria like vendors, brokers, metadata
- quiet hours
- email doesnt get all matches
done:
- read jobs
- parse jobs
- gather jobs
- read states
- read email to state file from local/sandbox/contact/contact