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": "" "Cookie": ""
} }
}, },
"EmailerEnabled": false,
"Emailer": { "Emailer": {
"From": "breellocaldev@gmail.com", "From": "breellocaldev@gmail.com",
"SMTP": "", "SMTP": "",

View File

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

View File

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

View File

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