Esempio n. 1
0
        protected async Task SendMail(EmailModel emailModel)
        {
            isLoadingFinished = false;
            await Task.Delay(1);

            try
            {
                var result = MailingService.SendMessage(emailModel);

                if (result)
                {
                    await MatDialogService.AlertAsync("The message sent.");
                }
            }
            catch (Exception e)
            {
                Logger.LogError(e, $"{GetUserName()}*Error: Zugangsdaten/SendMail");
                ErrorModel.IsOpen       = true;
                ErrorModel.ErrorContext = e.StackTrace;
                ErrorModel.ErrorMessage = e.Message;
                IsFailed = true;
                StateHasChanged();
            }
            finally
            {
                isLoadingFinished = true;
                StateHasChanged();
            }
        }
        public virtual void SendMailing()
        {
            MailingService mailingService = new MailingService(UserConnection);
            var            isDelayedStart = true;

            mailingService.SendMessage(new Guid(BulkEmailId), isDelayedStart, ApplicationUrl);
        }