Add the email sending and processing functions