/// <inheritdoc/>
        public async Task SendAsync(NotificationContentRequestModel notificationContentRequestModel)
        {
            var model     = notificationContentRequestModel as SmsRequestModel;
            var queueName = _configurationHelper.SmsQueueName();
            var smsDto    = new SmsDto {
                To = model.To, Body = model.Content
            };

            await _serviceBusHelper.SendMessageToQueueAsync(smsDto, queueName);
        }
Beispiel #2
0
        /// <inheritdoc/>
        public async Task SendAsync(NotificationContentRequestModel notificationContentRequestModel)
        {
            var model     = notificationContentRequestModel as EmailRequestModel;
            var email     = GetEmailModelProperties(model);
            var queueName = _configurationHelper.EmailQueueName();
            var emailDto  = new EmailDto
            {
                EmailData = JObject.FromObject(email),
                FromEmail = notificationContentRequestModel.From,
                ToEmail   = string.IsNullOrEmpty(model.To) ? _configurationHelper.SendGridToEmail() : model.To,
                Type      = model.Type
            };

            await _serviceBusHelper.SendMessageToQueueAsync(emailDto, queueName);
        }