add sorting emails script