moving mail to its own module