Refactored to avoid a Duplicate() call when sending error email.