email generate script