This example is pretty weak as multiple things are wrong here. Seems like there was a lack of error handling all the way through (or participants would've noticed errors on completing). And why wouldn't you save in DB before sending the email? After all, you can always recover sending the email - and it's awkward to send an email with results that didn't make it to your DB.