mail working with validation