Adds code for handling acceptance, and it sends an email