I’m trying to setup some notifications in our site and the notification is successfully being added to the bell icon in edit mode however we’re not receiving the notification email.
I’ve setting up content approvals as well to test the approval emails and we do receive the email notifications for approvals.
Does anyone know what we need to do to receive emails for the other notifications we’re setting up?
This is the code we’re using to create the notifications.
List notificationReceivers = (from sUser in usersInRole select System.Web.Security.Membership.GetUser(sUser) into user where user != null selectnew NotificationUser(user.UserName)) .Cast().ToList();
I’m trying to setup some notifications in our site and the notification is successfully being added to the bell icon in edit mode however we’re not receiving the notification email.
I’ve setting up content approvals as well to test the approval emails and we do receive the email notifications for approvals.
Does anyone know what we need to do to receive emails for the other notifications we’re setting up?
This is the code we’re using to create the notifications.
privateasyncvoid SendMessage(string message)
{
string[] usersInRole = Roles.GetUsersInRole("NotificationUsers");
INotificationUser notificationSender =new NotificationUser("NotificationUser");
List
select System.Web.Security.Membership.GetUser(sUser)
into user
where user != null
selectnew NotificationUser(user.UserName))
.Cast
await
this.Notifier.Service.PostNotificationAsync(
new NotificationMessage
{
ChannelName = Common.NotificationConstants.EmailChannel,
Content = message,
Subject ="Scheduled job",
Recipients = notificationReceivers,
Sender = notificationSender,
TypeName ="Monitor"
}
);
}
Thanks.