Ejemplo n.º 1
0
        private async Task SendCompanyOnboardingEmailAsync(InfoSessionFollowUpSpecDto specDto, OrganizationDto organization)
        {
            var receiversList = specDto.Receivers.ToList();

            for (int i = 0; i < receiversList.Count; i++)
            {
                var OrganizationShortcutName = organization.OrganizationShortcutName;
                if (String.IsNullOrEmpty(OrganizationShortcutName))
                {
                    OrganizationShortcutName = " ";
                }
                var parameters = new Dictionary <string, string>
                {
                    { "CompanyShortcut", OrganizationShortcutName },
                    { "supportPerson", organization.SupportPerson.Name }
                };

                await _emailSenderService.SendOnboardingEmailAsync(
                    receiversList[i],
                    (receiversList.Count > 1 && i == 0)?null : specDto.CcReceivers,
                    organization.OrganizationTypeId,
                    parameters)
                .ConfigureAwait(false);
            }
        }