Separate out emailing func into a service