fixed compose-mail function