// Token: 0x06001FFA RID: 8186 RVA: 0x000B9298 File Offset: 0x000B7498 protected bool RenderADEmailAddress(IListViewDataSource dataSource, TextWriter writer) { string text = dataSource.GetItemProperty <SmtpAddress>(ADRecipientSchema.PrimarySmtpAddress, SmtpAddress.Empty).ToString(); if (text.Length == 0) { return(false); } RecipientAddress.RecipientAddressFlags recipientAddressFlags = RecipientAddress.RecipientAddressFlags.None; RecipientDisplayType?itemProperty = dataSource.GetItemProperty <RecipientDisplayType?>(ADRecipientSchema.RecipientDisplayType, null); if (itemProperty == RecipientDisplayType.ConferenceRoomMailbox || itemProperty == RecipientDisplayType.SyncedConferenceRoomMailbox) { recipientAddressFlags |= RecipientAddress.RecipientAddressFlags.Room; } RecipientType itemProperty2 = dataSource.GetItemProperty <RecipientType>(ADRecipientSchema.RecipientType, RecipientType.Invalid); if (Utilities.IsADDistributionList(itemProperty2)) { recipientAddressFlags |= RecipientAddress.RecipientAddressFlags.DistributionList; } string itemProperty3 = dataSource.GetItemProperty <string>(ADRecipientSchema.LegacyExchangeDN, string.Empty); ProxyAddressCollection itemProperty4 = dataSource.GetItemProperty <ProxyAddressCollection>(ADRecipientSchema.EmailAddresses, null); string sipUri = InstantMessageUtilities.GetSipUri(itemProperty4); string mobilePhoneNumber = Utilities.NormalizePhoneNumber(dataSource.GetItemProperty <string>(ADOrgPersonSchema.MobilePhone, string.Empty)); this.RenderSingleEmailAddress(writer, dataSource.GetItemProperty <string>(ADRecipientSchema.DisplayName, string.Empty), text, text, itemProperty3, EmailAddressIndex.None, recipientAddressFlags, null, sipUri, mobilePhoneNumber); return(true); }
// Token: 0x06000B34 RID: 2868 RVA: 0x0004F5E0 File Offset: 0x0004D7E0 public static string GetSingleEmailAddress(IListViewDataSource dataSource, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType, string sipUri, string mobilePhoneNumber) { return(InstantMessageUtilities.GetSingleEmailAddress(dataSource, displayName, emailAddress, emailAddressForDisplay, legacyExchangeDN, emailAddressIndex, recipientAddressFlags, routingType, sipUri, mobilePhoneNumber, true)); }
// Token: 0x06000B33 RID: 2867 RVA: 0x0004F58C File Offset: 0x0004D78C public static string GetSingleEmailAddress(IListViewDataSource dataSource, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType, string sipUri, string mobilePhoneNumber, bool htmlEncodeEmailAddress) { StringBuilder stringBuilder = new StringBuilder(); using (StringWriter stringWriter = new StringWriter(stringBuilder)) { InstantMessageUtilities.RenderSingleEmailAddress(dataSource, stringWriter, displayName, emailAddress, emailAddressForDisplay, legacyExchangeDN, emailAddressIndex, recipientAddressFlags, routingType, sipUri, mobilePhoneNumber, htmlEncodeEmailAddress); } return(stringBuilder.ToString()); }
// Token: 0x06000B32 RID: 2866 RVA: 0x0004F400 File Offset: 0x0004D600 public static void RenderSingleEmailAddress(IListViewDataSource dataSource, TextWriter writer, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType, string sipUri, string mobilePhoneNumber, bool htmlEncodeEmailAddress) { writer.Write("<span id=\"ea\""); if (dataSource is FolderListViewDataSource) { writer.Write(" aO=1"); } else { writer.Write(" aO=2"); } writer.Write(" dn=\""); if (htmlEncodeEmailAddress) { Utilities.HtmlEncode(displayName, writer); } else { writer.Write(displayName); } writer.Write("\" rf="); int num = (int)recipientAddressFlags; Utilities.HtmlEncode(num.ToString(CultureInfo.InvariantCulture), writer); writer.Write(" rt=\""); if (!string.IsNullOrEmpty(routingType)) { writer.Write(routingType); } else if (!string.IsNullOrEmpty(legacyExchangeDN)) { writer.Write("EX\" lgDn=\""); Utilities.HtmlEncode(legacyExchangeDN, writer); } else if (recipientAddressFlags == RecipientAddress.RecipientAddressFlags.DistributionList) { writer.Write("MAPIPDL"); } else { writer.Write("SMTP"); } writer.Write("\" em=\""); if (htmlEncodeEmailAddress) { Utilities.HtmlEncode(emailAddress, writer); } else { writer.Write(emailAddress); } writer.Write("\" ei=\""); int num2 = (int)emailAddressIndex; Utilities.HtmlEncode(num2.ToString(), writer); if (!string.IsNullOrEmpty(sipUri)) { writer.Write("\" uri=\""); if (htmlEncodeEmailAddress) { Utilities.HtmlEncode(sipUri, writer); } else { writer.Write(sipUri); } } if (!string.IsNullOrEmpty(mobilePhoneNumber)) { writer.Write("\" mo=\""); if (htmlEncodeEmailAddress) { Utilities.HtmlEncode(mobilePhoneNumber, writer); } else { writer.Write(mobilePhoneNumber); } } writer.Write("\">"); if (htmlEncodeEmailAddress) { Utilities.HtmlEncode(emailAddressForDisplay, writer); } else { writer.Write(emailAddressForDisplay); } writer.Write("</span>"); }
public void ExpandDistributionList() { ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "RecipientWellEventHandler.ExpandDistributionList"); RecipientInfo[] array = (RecipientInfo[])base.GetParameter("Recips"); List <Participant> list = new List <Participant>(); foreach (RecipientInfo recipientInfo in array) { if (recipientInfo.StoreObjectId == null || !Utilities.IsMapiPDL(recipientInfo.RoutingType)) { throw new OwaEventHandlerException("The requested recipient is not personal distribution list"); } list.AddRange(DistributionList.ExpandDeep(base.UserContext.MailboxSession, recipientInfo.StoreObjectId)); } using (List <Participant> .Enumerator enumerator = list.GetEnumerator()) { AdRecipientBatchQuery adRecipientBatchQuery = new AdRecipientBatchQuery(enumerator, base.UserContext); bool flag = false; foreach (Participant participant in list) { string smtpAddress = null; string sipUri = null; ADObjectId adObjectId = null; StoreObjectId storeObjectId = null; EmailAddressIndex emailAddressIndex = EmailAddressIndex.None; string mobilePhoneNumber = null; if (participant.RoutingType == "EX") { ADRecipient adRecipient = adRecipientBatchQuery.GetAdRecipient(participant.EmailAddress); if (adRecipient != null) { smtpAddress = adRecipient.PrimarySmtpAddress.ToString(); adObjectId = adRecipient.Id; sipUri = InstantMessageUtilities.GetSipUri((ProxyAddressCollection)adRecipient[ADRecipientSchema.EmailAddresses]); mobilePhoneNumber = Utilities.NormalizePhoneNumber((string)adRecipient[ADOrgPersonSchema.MobilePhone]); } } else { smtpAddress = participant.EmailAddress; sipUri = participant.EmailAddress; } RecipientAddress.RecipientAddressFlags recipientAddressFlags = RecipientAddress.RecipientAddressFlags.None; if (participant.GetValueOrDefault <bool>(ParticipantSchema.IsDistributionList)) { recipientAddressFlags |= RecipientAddress.RecipientAddressFlags.DistributionList; } else if (participant.GetValueOrDefault <bool>(ParticipantSchema.IsRoom)) { recipientAddressFlags |= RecipientAddress.RecipientAddressFlags.Room; } StoreParticipantOrigin storeParticipantOrigin = participant.Origin as StoreParticipantOrigin; if (storeParticipantOrigin != null) { storeObjectId = storeParticipantOrigin.OriginItemId; emailAddressIndex = storeParticipantOrigin.EmailAddressIndex; } RecipientWellNode.Render(this.Writer, base.UserContext, participant.DisplayName, smtpAddress, participant.EmailAddress, participant.RoutingType, participant.GetValueOrDefault <string>(ParticipantSchema.Alias), RecipientAddress.ToAddressOrigin(participant), (int)recipientAddressFlags, storeObjectId, emailAddressIndex, adObjectId, flag ? RecipientWellNode.RenderFlags.RenderCommas : RecipientWellNode.RenderFlags.None, sipUri, mobilePhoneNumber); flag = true; } } }
// Token: 0x06001FFF RID: 8191 RVA: 0x000B9750 File Offset: 0x000B7950 private void RenderSingleEmailAddress(TextWriter writer, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType) { this.RenderSingleEmailAddress(writer, displayName, emailAddress, emailAddressForDisplay, legacyExchangeDN, emailAddressIndex, recipientAddressFlags, routingType, null, null); }
internal void RenderSingleEmailAddress(TextWriter writer, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType, string sipUri, string mobilePhoneNumber) { InstantMessageUtilities.RenderSingleEmailAddress(this.DataSource, writer, displayName, emailAddress, emailAddressForDisplay, legacyExchangeDN, emailAddressIndex, recipientAddressFlags, routingType, sipUri, mobilePhoneNumber); }