How to create an automated email from start to end