queue mail and clean code