|Version 2 (modified by anonymous, 6 years ago) (diff)|
English Users Guide 0.11
This guide is meant for all Trac 0.11 users having trouble installing this wonderful patch ;D.
The original guide can be found here : http://trac-html-notification.alwaysdata.net/
Please follow all these instructions carefully :
- Make a backup of your /trac/notification.py ,/trac/ticket/notification.py, and /trac/ticket/templates/ticket_notify_email.txt trust me this is very important.
- In Terminal navigate to your trac instance folder 'mine was here : /usr/lib/python2.5/site-packages/Trac.0.11...'
- Goto the /ticket folder and run the following command :
- Next you need to apply the patch, if you don't have the patch utility installed and you are running a debian system
you can run this command :
apt-get install patch
- Now patch the notification file by running this command :
patch -p0 notification.py notification.patch
- Next navigate to : /ticket/templates folder and run :
- Run the following command to patch :
patch -p0 ticket_notify_email.txt ticket_notify_email.patch
- Next open up the /trac/notification.py file in a text editor and on line 398 change :
msg = MIMEText(body, 'plain')to :
msg = MIMEText(body, 'html')
- Next is a bug I found on my box, I'm not sure why it happened- but it might happen to you to
so open up the /trac/ticket/notification.py file in a text editor like vi and change :
if not self.newticket: hdrs['Content-type'] = 'text/html; charset=utf-8' msgid = self.get_message_id(dest) hdrs['In-Reply-To'] = msgid hdrs['References'] = msgidto :
if not self.newticket: hdrs['Content-type'] = 'text/html; charset=utf-8' msgid = self.get_message_id(dest) hdrs['In-Reply-To'] = msgid hdrs['References'] = msgidSee the only thing I changed in the last step was the indentation, python actually depends on that...
- Last thing to do is restart apache :-D by doing this :
- Now go test it, edit a ticket and check your mail:-D
Please if anyone wants to change anything on this guide to make it easier to read, or to make more sense of it- go for it! :-D