add validation of recipient email address to Notification job
This commit is contained in:
		@ -89,9 +89,9 @@ namespace Oqtane.Infrastructure
 | 
			
		||||
                            }
 | 
			
		||||
 | 
			
		||||
                            // validate recipient
 | 
			
		||||
                            if (string.IsNullOrEmpty(notification.ToEmail))
 | 
			
		||||
                            if (string.IsNullOrEmpty(notification.ToEmail) || !MailAddress.TryCreate(notification.ToEmail, out _))
 | 
			
		||||
                            {
 | 
			
		||||
                                log += "Recipient Missing For NotificationId: " + notification.NotificationId + "<br />";
 | 
			
		||||
                                log += $"NotificationId: {notification.NotificationId} - Has Missing Or Invalid Recipient {notification.ToEmail}<br />";
 | 
			
		||||
                                notification.IsDeleted = true;
 | 
			
		||||
                                notificationRepository.UpdateNotification(notification);
 | 
			
		||||
                            }
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user