fixed mail bug and added check to see if on development server