Пример #1
0
        protected override void PrepareRecipientObject(ref ADContact contact)
        {
            TaskLogger.LogEnter();
            base.PrepareRecipientObject(ref contact);
            if (RecipientType.Contact != contact.RecipientType)
            {
                base.WriteError(new RecipientTaskException(Strings.ErrorInvalidRecipientType(this.Identity.ToString(), contact.RecipientType.ToString())), ErrorCategory.InvalidArgument, contact.Id);
            }
            contact.SetExchangeVersion(contact.MaximumSupportedExchangeObjectVersion);
            List <PropertyDefinition> list = new List <PropertyDefinition>(DisableMailContact.PropertiesToReset);

            MailboxTaskHelper.RemovePersistentProperties(list);
            MailboxTaskHelper.ClearExchangeProperties(contact, list);
            contact.SetExchangeVersion(contact.MaximumSupportedExchangeObjectVersion);
            if (this.DelayProvisioning && base.IsProvisioningLayerAvailable)
            {
                this.ProvisionDefaultValues(new ADContact(), contact);
            }
            contact.ExternalEmailAddress       = this.ExternalEmailAddress;
            contact.DeliverToForwardingAddress = false;
            contact.UsePreferMessageFormat     = this.UsePreferMessageFormat;
            contact.MessageFormat       = this.MessageFormat;
            contact.MessageBodyFormat   = this.MessageBodyFormat;
            contact.MacAttachmentFormat = this.MacAttachmentFormat;
            contact.RequireAllSendersAreAuthenticated = false;
            contact.UseMapiRichTextFormat             = UseMapiRichTextFormat.UseDefaultSettings;
            contact.RecipientDisplayType = new RecipientDisplayType?(RecipientDisplayType.RemoteMailUser);
            MailContactTaskHelper.ValidateExternalEmailAddress(contact, this.ConfigurationSession, new Task.ErrorLoggerDelegate(base.WriteError), base.ProvisioningCache);
            TaskLogger.LogExit();
        }
Пример #2
0
 protected override void PrepareRecipientObject(ADContact dataObject)
 {
     TaskLogger.LogEnter();
     base.PrepareRecipientObject(dataObject);
     MailContactTaskHelper.ValidateExternalEmailAddress(dataObject, this.ConfigurationSession, new Task.ErrorLoggerDelegate(base.WriteError), base.ProvisioningCache);
     dataObject.UseMapiRichTextFormat = UseMapiRichTextFormat.Never;
     TaskLogger.LogExit();
 }
Пример #3
0
        protected override IConfigurable PrepareDataObject()
        {
            TaskLogger.LogEnter();
            ADContact adcontact = (ADContact)base.PrepareDataObject();

            if (adcontact.RecipientDisplayType == null)
            {
                adcontact.RecipientDisplayType = new RecipientDisplayType?(RecipientDisplayType.RemoteMailUser);
            }
            if (adcontact.IsChanged(ADRecipientSchema.ExternalEmailAddress))
            {
                MailContactTaskHelper.ValidateExternalEmailAddress(adcontact, this.ConfigurationSession, new Task.ErrorLoggerDelegate(base.WriteError), base.ProvisioningCache);
            }
            TaskLogger.LogExit();
            return(adcontact);
        }