Problem - could not instatiate mail function