public void SendMailNotification(int tenant, string userId, MailNotificationState state) { try { MakeRequest("sendMailNotification", new { tenant, userId, state }); } catch (Exception error) { ProcessError(error); } }
private void SendMailErrorNotification(MailDraftData draft, MailNotificationState state = MailNotificationState.SendMessageError) { try { // send success notification _signalrServiceClient.SendMailNotification(draft.Mailbox.TenantId, draft.Mailbox.UserId, state); } catch (Exception ex) { Log.ErrorFormat("Unexpected error with wcf signalrServiceClient: {0}, {1}", ex.Message, ex.StackTrace); } }
private void SendMailNotification(MailDraftData draft) { try { MailNotificationState state = 0; if (!string.IsNullOrEmpty(draft.CalendarIcs)) { switch (draft.CalendarMethod) { case Defines.ICAL_REQUEST: state = MailNotificationState.SentIcalRequest; break; case Defines.ICAL_REPLY: state = MailNotificationState.SentIcalResponse; break; case Defines.ICAL_CANCEL: state = MailNotificationState.SentIcalCancel; break; } } if (draft.IsReceipt) { state = MailNotificationState.ReadingConfirmed; } // send success notification _signalrServiceClient.SendMailNotification(draft.Mailbox.TenantId, draft.Mailbox.UserId, state); } catch (Exception ex) { Log.ErrorFormat("Unexpected error with wcf signalrServiceClient: {0}, {1}", ex.Message, ex.StackTrace); } }