/// <summary>
 /// Fixed:
 /// </summary>
 public string GetDestinations()
 {
     if (!Contract.Mail())
     {
         return Error.Types.Restricted.MessageJson();
     }
     var siteModel = new ItemModel(ReferenceId).GetSite();
     var ss = siteModel.SitesSiteSettings(ReferenceId);
     return new OutgoingMailsResponseCollection(this)
         .Html("#OutgoingMails_MailAddresses",
             new HtmlBuilder().SelectableItems(
                 listItemCollection: OutgoingMailUtilities.Destinations(
                     referenceId: siteModel.InheritPermission,
                     addressBook: OutgoingMailUtilities.AddressBook(ss),
                     searchRange: DestinationSearchRange,
                     searchText: DestinationSearchText),
                 selectedValueTextCollection: new List<string>())).ToJson();
 }
        /// <summary>
        /// Fixed:
        /// </summary>
        public string GetDestinations(Context context)
        {
            var siteModel = new ItemModel(
                context: context,
                referenceId: ReferenceId).GetSite(context: context);
            var ss = siteModel.SitesSiteSettings(context: context, referenceId: ReferenceId);

            if (context.ContractSettings.Mail == false)
            {
                return(Error.Types.Restricted.MessageJson(context: context));
            }
            return(new OutgoingMailsResponseCollection(this)
                   .Html("#OutgoingMails_MailAddresses",
                         new HtmlBuilder().SelectableItems(
                             listItemCollection: OutgoingMailUtilities.Destinations(
                                 context: context,
                                 ss: ss,
                                 referenceId: siteModel.InheritPermission,
                                 addressBook: OutgoingMailUtilities.AddressBook(ss),
                                 searchRange: DestinationSearchRange,
                                 searchText: DestinationSearchText),
                             selectedValueTextCollection: new List <string>())).ToJson());
        }