 sendwithus = require '../sendwithus'
 if config.isProduction or config.redis.host isnt "localhost" #TODO: Ask Nick and Scott to change their environment variables and change the deploy ones
   lockManager = require '../commons/LockManager'
-#TODO: Ask Nick about email unsubscriptions
-
+  
 module.exports.setup = (app) ->
   app.all config.mail.mailchimpWebhook, handleMailchimpWebHook
   app.get '/mail/cron/ladder-update', handleLadderUpdate

  findParameters = 
    "jobProfile.updated":
      $lte: @currentTime.toISOString()
      gt: @beginningOfUTCDay.toISOString()
    "jobProfileApproved": false 
  User.find(findParameters).select("_id jobProfile.name jobProfile.updated").lean().exec cb
  

  
candidateFilter = (candidate, sentEmailFilterCallback) ->
  if candidate.emails?.anyNotes?.enabled is false or candidate.emails?.recruitNotes?.enabled is false
    return sentEmailFilterCallback true
  findParameters =
    "user": candidate._id
