How to work with automated emails