private EnvelopeSummary SendEmails(List <AttachmentData> documents, List <SignerData> signer, ActionContextInfo context) { var envelope = CreateEnvelope(); var sendHelper = new EnvelopSendingHelper(_logger, Configuration, Configuration.RecipientSelection.UseSMS); sendHelper.CompleteEnvelopeData(envelope, documents, signer, out string documentsInfoToSave); envelope.CompositeTemplates.FirstOrDefault().InlineTemplates.FirstOrDefault().Recipients.Signers.FirstOrDefault().ClientUserId = Guid.NewGuid().ToString(); SaveEmbededInfoOnForm(context, envelope, documentsInfoToSave); var apiClient = new ApiClient(); _logger.AppendLine("Sending envelope"); return(new ApiHelper(apiClient, Configuration.ApiSettings, _logger).SendEnvelope(envelope)); }
private Tuple <EnvelopeSummary, string> SendEmails(List <AttachmentData> documents, List <SignerData> signers) { var envelope = CreateEnvelope(); var sendHelper = new EnvelopSendingHelper(_logger, Configuration, Configuration.RecipientsSelection.UseSMS); sendHelper.CompleteEnvelopeData(envelope, documents, signers, out string documentsInfoToSave); var apiClient = new ApiClient(); _logger.AppendLine("Sending envelope"); var apiHelper = new ApiHelper(apiClient, Configuration.ApiSettings, _logger); var result = new Tuple <EnvelopeSummary, string>(apiHelper.SendEnvelope(envelope), documentsInfoToSave); return(result); }