mail function with ajax submit