Fix to access emailhandler from models