Improved management of periods in mail sender script