// Token: 0x060006A4 RID: 1700 RVA: 0x000344C4 File Offset: 0x000326C4 internal static InfobarMessage AddEmailToSendersList(UserContext userContext, HttpRequest httpRequest) { string formParameter = Utilities.GetFormParameter(httpRequest, "hidsndrslst"); string formParameter2 = Utilities.GetFormParameter(httpRequest, "hidsndreml"); string messageText; if (JunkEmailUtilities.Add(formParameter2, JunkEmailHelper.GetListType(formParameter), userContext, false, out messageText)) { return(InfobarMessage.CreateText(messageText, InfobarMessageType.Informational)); } return(InfobarMessage.CreateText(messageText, InfobarMessageType.Error)); }
// Token: 0x060006A3 RID: 1699 RVA: 0x00034310 File Offset: 0x00032510 internal static InfobarMessage MarkAsNotJunk(UserContext userContext, params StoreObjectId[] ids) { if (userContext == null) { throw new ArgumentNullException("userContext"); } if (ids == null) { throw new ArgumentNullException("ids"); } InfobarMessage result = null; string defaultFolderDisplayName = Utilities.GetDefaultFolderDisplayName(userContext.MailboxSession, DefaultFolderType.Inbox); if (ids.Length == 1) { SanitizedHtmlString sanitizedHtmlString = SanitizedHtmlString.Empty; string text; try { text = Utilities.GetSenderSmtpAddress(ids[0].ToBase64String(), userContext); } catch (ObjectNotFoundException) { text = null; } if (!string.IsNullOrEmpty(text) && userContext.IsJunkEmailEnabled && !JunkEmailUtilities.IsInternalToOrganization(text, userContext)) { sanitizedHtmlString = JunkEmailHelper.BuildAddToListLinkString(JunkEmailListType.SafeSenders, text); } AggregateOperationResult aggregateOperationResult = userContext.MailboxSession.Move(userContext.InboxFolderId, ids); if (aggregateOperationResult.OperationResult == OperationResult.Succeeded) { if (SanitizedStringBase <OwaHtml> .IsNullOrEmpty(sanitizedHtmlString)) { result = InfobarMessage.CreateText(string.Format(LocalizedStrings.GetNonEncoded(-1881687711), defaultFolderDisplayName, sanitizedHtmlString), InfobarMessageType.Informational); } else { result = InfobarMessage.CreateHtml(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(-1881687711), new object[] { defaultFolderDisplayName, sanitizedHtmlString }), InfobarMessageType.Informational); } } else if (SanitizedStringBase <OwaHtml> .IsNullOrEmpty(sanitizedHtmlString)) { result = InfobarMessage.CreateText(string.Format(LocalizedStrings.GetNonEncoded(300728662), sanitizedHtmlString), InfobarMessageType.Informational); } else { result = InfobarMessage.CreateHtml(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(300728662), new object[] { sanitizedHtmlString }), InfobarMessageType.Informational); } } else { AggregateOperationResult aggregateOperationResult2 = userContext.MailboxSession.Move(userContext.InboxFolderId, ids); switch (aggregateOperationResult2.OperationResult) { case OperationResult.Succeeded: result = InfobarMessage.CreateText(string.Format(LocalizedStrings.GetNonEncoded(1632419544), defaultFolderDisplayName), InfobarMessageType.Informational); break; case OperationResult.Failed: result = InfobarMessage.CreateLocalized(1682703853, InfobarMessageType.Informational); break; case OperationResult.PartiallySucceeded: result = InfobarMessage.CreateLocalized(521322677, InfobarMessageType.Informational); break; } } return(result); }