How to set restrictions after an email is sent