Beispiel #1
0
 public GroupWarmingMessageComposer(ADUser groupMailbox, ADUser executingUser)
 {
     ArgumentValidator.ThrowIfNull("groupMailbox", groupMailbox);
     this.encodedGroupDisplayName = AntiXssEncoder.HtmlEncode(groupMailbox.DisplayName, false);
     this.plainGroupDisplayName   = groupMailbox.DisplayName;
     this.groupMailbox            = groupMailbox;
     this.participant             = new Participant(groupMailbox);
     this.preferredCulture        = BaseGroupMessageComposer.GetPreferredCulture(new ADUser[]
     {
         groupMailbox
     });
 }
Beispiel #2
0
 public WelcomeToGroupMessageComposer(WelcomeToGroupMessageTemplate template, ADUser recipient, ADUser group)
 {
     ArgumentValidator.ThrowIfNull("template", template);
     ArgumentValidator.ThrowIfNull("recipient", recipient);
     this.template         = template;
     this.recipient        = recipient;
     this.preferredCulture = BaseGroupMessageComposer.GetPreferredCulture(new ADUser[]
     {
         recipient,
         group
     });
 }
        protected override void WriteMessageBody(StreamWriter streamWriter)
        {
            ExchangePrincipal exchangePrincipal = ExchangePrincipal.FromADUser(this.groupAdUser, null);

            GroupJoinRequestMessageBodyBuilder.WriteMessageToStream(streamWriter, this.mailboxSession.MailboxOwner.MailboxInfo.DisplayName, this.groupAdUser.DisplayName, this.attachedMessageBody, new MailboxUrls(exchangePrincipal, false), BaseGroupMessageComposer.GetPreferredCulture(new ADUser[]
            {
                this.groupAdUser
            }));
        }