Fetch data from a database, format and send as email.