Cannot make Trac produce HTML email notifications

Description

I have installed the AnnouncerPlugin v0.2 but cannot manage to trigger HTML email notifications. Could be because of wrong configuration. The documentation states "For tickets, both a plain text and HTML formatter are currently supplied, and you may choose which you wish to receive in your preferences." but it does not mention how to specify the HTML or Text formatter.

I'm still not receiving HTML email notifications even after installing the latest version of the AnnouncerPlugin trunk [7280] on Trac 0.12dev-r9098.

Initially, the email was plain text even though I had specified html. I then set default_email_format = text/html and now I receive a notification with html in the header, but not for the body of the comment.

So,

It appears there is a minor issue whereby the user's preference is ignored if default_email_format is not specified.

It appears that in this case [7146] did not resolve this issue, or else I need to change a configuration.

This still does not seem to be working for me after updating to 0.11dev [7594]. I've tested on and Trac 0.11.7stable-r9170. I get the Comment in plain text: prefix to the comment from the failed try/catch.

My test message is (I added the line numbers just now, so they won't appear in the images below):

1. Adding some wiki markup to see if it is formatted to HTML nicely ...
2. Let's go to WikiStart!
3. And then look at Changeset [1]!
4. And then look at Report {1}!
5. And then look at ticket #1!
6. And then look at milestone:1!!!
7.
{{{
#!python
m = [m for m in milestones if milestone.is_overdue is False]
}}}

However, if I add a comment with just one of those 7 lines, I receive an email with 'Comment in plain text:', except for (1) which is already just plain text, and (7). Also of interest is that all the ticket fields labels are missing and their values shown as None, even though they are set for the ticket.

Seems to be working as of [7609], with the exception of preformatting, as you already mentioned. I'm using Outlook for a client, and I'm receiving the ticket field labels on my 0.11.4 instance of Trac running on a hosting provider (CentOS 5 with Python 2.4) with the 0.11 branch of AnnouncerPlugin.

Here is my latest test case, and a screen capture sent to Gmail. The comment appears to be in all italics, so you can't see markup that is in italics.

1. Adding some wiki markup to see if it is formatted to HTML nicely ...
2. Let's go to WikiStart!
3. And then look at Changeset [1]!
4. And then look at Report {1}!
5. And then look at ticket #1!
6. And then look at milestone:1!!!
7.
{{{
#!python
m = [m for m in milestones if milestone.is_overdue is False]
}}}
8. Try some ''italics text''.
9. Try some '''bold text'''.
10. Create a traclink to the [source:/test/dir1/file1@1:2-3#L2 repository].
11. Try some pre-formatted text to see
{{{
If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ... If its the same as with the python code block ...
}}}

I can't reproduce the ticket field labels and values problem. I tried announcer-trunk and announcer-0.11dev. Can you please try running it on trac-trunk with only announcerplugin installed to see if you can reproduce? Please make a new ticket for this issue if you can't figure it out.

As far as the styling of comments. I don't think it will ever be perfect. The Trac system relies heavily on the incoming request object and associated user session to render wiki text. The way I got it working is extremely hackish. I will try to remove the italics, but I'll leave the dirty work of making it look nice to someone who is better at things like that.

Add Comment

This ticket has been modified since you started editing. You should review the
other modifications which have been appended above,
and any conflicts shown in the preview below.
You can nevertheless proceed and submit your changes if you wish so.