added mail function to common