Setting up sending of emails