set up emails as background jobs