--- trac-0.10.orig/templates/wiki_notify_email.cs
+++ trac-0.10/templates/wiki_notify_email.cs
@@ -0,0 +1,27 @@
+<?cs if:$action == 'add' ?>
+Added page "<?cs var:$name ?>" by <?cs var:$author ?> from <?cs var:$ip ?>
+Page URL: <<?cs var:$link ?>>
+Comment: <?cs var:$comment ?>
+Content:
+
+<?cs var:$text ?>
+
+<?cs elif:$action == 'mod' ?>
+
+Changed page "<?cs var:$name ?>" by <?cs var:$author ?> from <?cs var:$ip ?>
+Page URL: <<?cs var:$link ?>>
+Diff URL: <<?cs var:$linkdiff ?>>
+Revision <?cs var:$version ?> 
+Comment: <?cs var:$comment ?>
+Changes:
+  
+<?cs var:$diff ?>
+
+<?cs elif:$action == 'del' ?>
+Deleted page "<?cs var:$name ?>" by <?cs var:$author ?> from <?cs var:$ip ?>
+Comment: <?cs var:$comment ?>
+
+<?cs /if ?>
+-- 
+<?cs var:$project.name ?> <<?cs var:$project.url ?>>
+<?cs var:$project.descr ?>
--- trac-0.10.orig/trac/notification.py
+++ trac-0.10/trac/notification.py
@@ -24,6 +24,10 @@
 from trac.web.chrome import Chrome
 from trac.web.clearsilver import HDFWrapper
 from trac.web.main import populate_hdf
+from trac.core import *
+from trac.wiki.api import IWikiChangeListener
+from trac.wiki.model import WikiPage
+from trac.versioncontrol.diff import unified_diff
 
 MAXHEADERLEN = 76
 
@@ -85,6 +89,8 @@
     use_tls = BoolOption('notification', 'use_tls', 'false',
         """Use SSL/TLS to send notifications (''since 0.10'').""")
 
+    wiki_notify_email = Option('notification', 'wiki_notify_email', '',
+        """Comma-separated list of email addresses which should receive wiki notifications.""")
 
 class Notify(object):
     """Generic notification class for Trac.
@@ -369,3 +375,68 @@
                 pass
         else:
             self.server.quit()
+
+
+class WikiNotifyEmail(Component):
+    """Notification of wiki changes."""
+   
+    implements(IWikiChangeListener)
+    
+    # IWikiChangeListener methods
+    def wiki_page_added(self, page):
+        wn = self.Notifier(page.env)
+        wn.notify(page,"add")
+        
+    def wiki_page_changed(self, page, version, t, comment, author, ipnr):
+        wn = self.Notifier(page.env)
+        wn.hdf["comment"] = comment
+        wn.hdf["author"] = author
+        wn.hdf["ip"] = ipnr
+        wn.notify(page,"mod")
+
+    def wiki_page_deleted(self, page):
+        wn = self.Notifier(page.env)
+        wn.notify(page,"del")
+
+    
+    #Send mail class
+    class Notifier(NotifyEmail):
+        template_name = "wiki_notify_email.cs"
+        from_email = 'trac+wiki@localhost'
+        
+        def __init__(self, env):
+            NotifyEmail.__init__(self, env)
+	    self.env = env
+    
+        def notify(self, page, action):
+            self.hdf["name"] = page.name
+            self.hdf["text"] = page.text
+            self.hdf["version"] = "%i" % page.version
+
+            #self.hdf["new"] = (page.version == 0) and '1' or '0'
+            self.hdf["action"] = action
+            self.hdf["link"] = self.env.abs_href.wiki(page.name)
+            self.hdf["linkdiff"] = "%s?action=diff&version=%i" % (self.env.abs_href.wiki(page.name), page.version)
+           
+            if page.version > 0:
+                oldpage = WikiPage(self.env, page.name, page.version - 1)
+                self.hdf["oldversion"] = "%i" % oldpage.version
+                self.hdf["oldtext"] = oldpage.text
+                
+                diff = "" 
+                for line in unified_diff(oldpage.text.splitlines(),page.text.splitlines(), context=3):
+                    diff = diff + "%s\n" % line
+                self.hdf["diff"] = diff                
+            
+            projname = self.config.get('project', 'name')
+            subject = '[%s] wiki:%s' % (projname, page.name)
+            
+            NotifyEmail.notify(self, None, subject)
+        
+        def get_recipients(self, tktid):
+            val = self.config.get('notification', 'wiki_notify_email').split(',')
+            self.env.log.debug("wiki notification recipients: %r" % val)
+            if val is not None and len(val)>0:
+                return val, []
+            else:
+                return [], []

