public XElement Serialize()
        {
            var result = new XElement(Constants.XMLNamespaces.EHEALTHBOX_PUBLICATION + "SendMessageRequest",
                                      new XAttribute("xmlns", Constants.XMLNamespaces.EHEALTHBOX_PUBLICATION));

            if (BoxId != null)
            {
                result.Add(BoxId.Serialize());
            }

            foreach (var contextType in DestinationContextLst)
            {
                result.Add(contextType.Serialize());
            }

            result.Add(ContentContext.Serialize());
            foreach (var copyMailTo in CopyMailToLst)
            {
                result.Add(new XElement("CopyMailTo", copyMailTo));
            }

            if (!string.IsNullOrWhiteSpace(PublicationId))
            {
                result.Add(new XAttribute("PublicationId", PublicationId));
            }

            return(result);
        }