My preference would be to send email prior to writing final status to DB. Also if the email sending fails, you can change the statusMsg (the verbose human readable message) to reflect that. That way to we have record in the job state, rather than have to look into the logs.