Example #1
0
        /// <summary>
        /// Sets mailbox identifier in email draft.
        /// </summary>
        /// <param name="activity"><see cref="Activity"/> instance.</param>
        /// <param name="emailMessage"><see cref="EmailMessage"/> instance.</param>
        protected void SetMailboxInEMD(Entity activity, EmailMessage emailMessage)
        {
            var helper = ClassFactory.Get <EmailMessageHelper>(
                new ConstructorArgument("userConnection", UserConnection));
            var headers = emailMessage.HeaderProperties.ToDictionary(pair => pair.Name, pair => pair.Value);
            var ticks   = ActivityUtils.GetSendDateTicks(UserConnection, activity);

            headers["SendDateTicks"] = ticks.ToString();
            helper.CreateEmailMessage(activity, Guid.Empty, headers, true);
        }