added example script for automated email retrieval