Skip to main content
Tweeted twitter.com/StackSharePoint/status/685338181034749953
added 214 characters in body
Source Link
Naveen
  • 1.9k
  • 3
  • 35
  • 66

I created a simple event receiver of SPEmailEventReceiver. But while creating it, Visual Studio did not ask me on which list/library it needs to be attached. In PowerShell I know that I can get event receivers like this.

$site = Get-SPSite -Identity "SITE"
$web = $site.RootWeb
$list = $web.Lists["LIST/LIBRARY"]
$list.EventReceivers | Select assembly, name, type

But how can I check where the SPEmailEventReceiver event receiver is attached?

Update 1:

I have used ListTemplateId="101" while defining the event receiver so this should be applicable to all lists/libraries, right? For this how to know check where the event receiver is attached?

I created a simple event receiver of SPEmailEventReceiver. But while creating it, Visual Studio did not ask me on which list/library it needs to be attached. In PowerShell I know that I can get event receivers like this.

$site = Get-SPSite -Identity "SITE"
$web = $site.RootWeb
$list = $web.Lists["LIST/LIBRARY"]
$list.EventReceivers | Select assembly, name, type

But how can I check where the SPEmailEventReceiver event receiver is attached?

I created a simple event receiver of SPEmailEventReceiver. But while creating it, Visual Studio did not ask me on which list/library it needs to be attached. In PowerShell I know that I can get event receivers like this.

$site = Get-SPSite -Identity "SITE"
$web = $site.RootWeb
$list = $web.Lists["LIST/LIBRARY"]
$list.EventReceivers | Select assembly, name, type

But how can I check where the SPEmailEventReceiver event receiver is attached?

Update 1:

I have used ListTemplateId="101" while defining the event receiver so this should be applicable to all lists/libraries, right? For this how to know check where the event receiver is attached?

Source Link
Naveen
  • 1.9k
  • 3
  • 35
  • 66

How to check where 'SPEmailEventReceiver' is attached?

I created a simple event receiver of SPEmailEventReceiver. But while creating it, Visual Studio did not ask me on which list/library it needs to be attached. In PowerShell I know that I can get event receivers like this.

$site = Get-SPSite -Identity "SITE"
$web = $site.RootWeb
$list = $web.Lists["LIST/LIBRARY"]
$list.EventReceivers | Select assembly, name, type

But how can I check where the SPEmailEventReceiver event receiver is attached?