I have it working in 2010.
A new Alert Template.
a.Original is found here:
\14\TEMPLATE\XML\alerttemplates.xml
b.The custom templates are found in this file which has the original definitions plus the custom definitions.
CCPersonalAlertTemplates.xml
c.Load them with stsadm
stsadm.exe -o updatealerttemplates -url "http://Beefy.com/Sites/my_name" -filename " \CCPersonalAlertTemplates.xml"
d.Every out of the box solution has a matching custom template.
The custom templates have a .ext at the end of their name.
The custom features also call a custom NotificationHandlerAssembly like this:
<Properties>
<NotificationHandlerAssembly>Shared.CCPersonalEmail, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5694e116d3fc8c0c</NotificationHandlerAssembly>
<NotificationHandlerClassName>Shared.CCPersonalEmail.CCPersonalClass
</NotificationHandlerClassName>
<NotificationHandlerProperties />
</Properties>
Custom Notification Handler assembly
a.IAlertNotifyHandler that implements an OnNotification method
- Attempts to send the custom alert (if it fails send normal alert.)
Custom alert:
Gets the PersonalEmail field data from the User Information List
If Personal Email is empty it just sends normal alert
If personal email is populated
Send normal email to internal email
Send reduced email to external address
Replace http://
with external address http://extranet-
Regex replace (keep content data from being sent)
<td class=\"formlabel\">.*<td class=\"altvb\"> </td>
Make all the alerts use the external template
Housekeeping
a.During feature activation