Example #1
0
        // Token: 0x0600147E RID: 5246 RVA: 0x00076708 File Offset: 0x00074908
        protected override void InternalCopyFromModified(IProperty srcProperty)
        {
            string  stringData = ((IStringProperty)srcProperty).StringData;
            Contact contact    = base.XsoItem as Contact;

            if (string.IsNullOrEmpty(stringData))
            {
                contact.EmailAddresses.Remove(this.emailIndex);
                return;
            }
            Participant participant = contact.EmailAddresses[this.emailIndex];
            string      text        = null;
            string      text2       = null;

            if (participant != null && !string.IsNullOrEmpty(participant.EmailAddress))
            {
                text2 = EmailAddressConverter.LookupEmailAddressString(participant, contact.Session.MailboxOwner);
                text  = XsoEmailProperty.GetFullEmailString(participant.DisplayName, text2);
                AirSyncDiagnostics.TraceDebug <string, string, string>(ExTraceGlobals.XsoTracer, this, "XSOEmailProperty convertedSmtpAddress :{0}, currentEmail:{1}, RoutingType:{2}", text2, text, participant.RoutingType);
                if (participant.RoutingType == "EX" && text2 == participant.EmailAddress)
                {
                    text2 = SmtpProxyAddress.EncapsulateAddress("EX", participant.EmailAddress, SendMailBase.DefaultDomain);
                    text  = XsoEmailProperty.GetFullEmailString(participant.EmailAddress, text2);
                }
            }
            if (stringData != text && stringData != text2)
            {
                contact.EmailAddresses.Remove(this.emailIndex);
                contact.EmailAddresses.Add(this.emailIndex, EmailAddressConverter.CreateParticipant(stringData));
            }
        }
        protected override void InternalCopyFromModified(IProperty srcProperty)
        {
            MessageItem messageItem = (MessageItem)base.XsoItem;

            if (!string.IsNullOrEmpty(((IStringProperty)srcProperty).StringData))
            {
                messageItem.From = EmailAddressConverter.CreateParticipant(((IStringProperty)srcProperty).StringData);
            }
        }
Example #3
0
        protected override void InternalCopyFromModified(IProperty srcProperty)
        {
            MessageItem messageItem = (MessageItem)base.XsoItem;

            messageItem.ReplyTo.Clear();
            IStringProperty stringProperty = (IStringProperty)srcProperty;
            string          stringData     = stringProperty.StringData;

            char[] separator = new char[]
            {
                ',',
                ';'
            };
            foreach (string text in stringData.Split(separator))
            {
                if (!string.IsNullOrEmpty(text))
                {
                    messageItem.ReplyTo.Add(EmailAddressConverter.CreateParticipant(text));
                }
            }
        }
        protected override void InternalCopyFromModified(IProperty srcProperty)
        {
            MessageItem messageItem = (MessageItem)base.XsoItem;

            messageItem.Sender = EmailAddressConverter.CreateParticipant(((IStringProperty)srcProperty).StringData);
        }