How to generate SPAlert from some list to specific user with c# who doesn't subscribe that list? User cannot be added to list subscribers.
|
Once you have written your own implementation of OnNotification() you can send the email to whomever you would like. Alert customization It is possible to send a user an alert without having them be a subscriber, but it is a poor workaround to a better design alternative of empowering the user to control their own alerts. Here are the properties of an alert. The SPAlert item is a store of a few specific properties and then a reference to 3 other records solving the many:many:many problem by turning them into one:many. See the starred items below:
The whole basis for the alerts system is to match up a list : alert template : Site Collection User. Your question asks if you can make a stool with only 2 legs. Naturally, the answer is yes, well kind of... You could make one with your service account as a user and catch that in your event receiver and then replace the email address
I would look at the requirements closely and see if this is a code solution to a people problem and consider drawing the line between people and code in a different place. |
|||
|
|
SharePoint alerts do not have anything that would allow this. However, you could do this via SharePoint Designer Workflow as long as you don't mind the format of the message being a little bit different than a standard alert |
|||||
|