diff --git a/config.json b/config.json index 76c51e9..7f4ae76 100644 --- a/config.json +++ b/config.json @@ -14,6 +14,7 @@ "Cookie": "" } }, + "EmailerEnabled": false, "Emailer": { "From": "breellocaldev@gmail.com", "SMTP": "", diff --git a/config/config.go b/config/config.go index daaa08e..5068fc0 100644 --- a/config/config.go +++ b/config/config.go @@ -21,7 +21,8 @@ type Config struct { Cookie string } } - Emailer contact.Emailer + Emailer contact.Emailer + EmailerEnabled bool lock sync.Mutex db storage.DB diff --git a/main.go b/main.go index f2d6cb7..f7a4880 100644 --- a/main.go +++ b/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) diff --git a/todo.yaml b/todo.yaml index e71f6f7..7c75a7b 100644 --- a/todo.yaml +++ b/todo.yaml @@ -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