change some logic in mail send