add emailer enabled to config, added todo since its a little wrong
parent
70f15434ff
commit
f4c4e9cfbc
|
|
@ -14,6 +14,7 @@
|
|||
"Cookie": ""
|
||||
}
|
||||
},
|
||||
"EmailerEnabled": false,
|
||||
"Emailer": {
|
||||
"From": "breellocaldev@gmail.com",
|
||||
"SMTP": "",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ type Config struct {
|
|||
Cookie string
|
||||
}
|
||||
}
|
||||
Emailer contact.Emailer
|
||||
Emailer contact.Emailer
|
||||
EmailerEnabled bool
|
||||
|
||||
lock sync.Mutex
|
||||
db storage.DB
|
||||
|
|
|
|||
3
main.go
3
main.go
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue