Beispiel #1
0
        public async Task SendAsync(SendTwoFactorAuthenticationNotificationAdto sendTwoFactorAuthenticationNotificationAdto)
        {
            using (ITransaction transaction = _transactionManager.Create())
            {
                await Message.SendAsync(SendNotificationMessage.Create(
                                            TwoFactorAuthenticationNotificationMap.ForType(sendTwoFactorAuthenticationNotificationAdto.TwoFactorAuthenticationType),
                                            sendTwoFactorAuthenticationNotificationAdto.IdentityId,
                                            new Dictionary <string, string>
                {
                    {
                        nameof(sendTwoFactorAuthenticationNotificationAdto.Token),
                        sendTwoFactorAuthenticationNotificationAdto.Token
                    }
                }));

                transaction.Commit();
            }
        }
Beispiel #2
0
        public void SendNotification(string subject, IEnumerable <EmailAddress> recipients, string body)
        {
            var message = new SendNotificationMessage
            {
                Recipients = recipients,
                Subject    = subject,
                Body       = body,
                From       =
                    new EmailAddress
                {
                    Address     = EmailAddressConstants.InformationtechnologygroupEmailAddress,
                    DisplayName = "Austin Foam Plastic IT"
                },
                IsBodyHtml = false
            };

            IEndpoint endpoint = _endpointResolver.GetEndpoint(_notificationEndpoint.ToString());

            endpoint.Send(message);
        }
        public void SendNotification(string subject, IEnumerable<EmailAddress> recipients, string body)
        {
            var message = new SendNotificationMessage
                              {
                                  Recipients = recipients,
                                  Subject = subject,
                                  Body = body,
                                  From =
                                      new EmailAddress
                                          {
                                              Address = EmailAddressConstants.InformationtechnologygroupEmailAddress,
                                              DisplayName = "Austin Foam Plastic IT"
                                          },
                                  IsBodyHtml = false
                              };

            IEndpoint endpoint = _endpointResolver.GetEndpoint(_notificationEndpoint.ToString());

            endpoint.Send(message);
        }