Exemplo n.º 1
0
        private void InitializeMailObjects()
        {
            clearMailModel = new ClearMailModel();
            clearMailModel.personalizations = new List <Personalizations>();
            clearMailModel.from             = new From();
            clearMailModel.content          = new List <Content>();
            clearMailModel.attachments      = new List <Attachments>();

            personalizations    = new Personalizations();
            personalizations.to = new List <To>();
            attachments         = new Attachments();
        }
Exemplo n.º 2
0
        private void ResetMailObjects()
        {
            clearMailModel   = null;
            personalizations = null;
            attachments      = null;

            if (attachmentList.Any())
            {
                attachmentList.Clear();
            }

            if (tempAttachmentList.Any())
            {
                tempAttachmentList.Clear();
            }

            if (cmRecipientsList.Any())
            {
                cmRecipientsList.Clear();
            }
        }