issue #16: some updates on the email script