// ENHANCEME: Need to implement a waiting state to retry sending mails.
mailMessage.setState(ERCMailState.EXCEPTION_STATE);
mailMessage.setExceptionReason(e.getMessage());
// Report the mailing error
ERCoreBusinessLogic.sharedInstance().reportException(e, new NSDictionary(mailMessage.snapshot(),
"Mail Message Snapshot"));
} finally {
// The editingcontext will not have any changes if an optimistic error occurred
if (mailMessage.editingContext().hasChanges()) {
try {