== Customizing email content for MS Outlook
MS Outlook normally presents plain text emails with a variable-width font, and as a result the ticket properties table will most certainly look like a mess in MS Outlook. This can be fixed with some customization of email template.
Replace the following second row in the template:
{{{
${ticket_props}
}}}
with this (requires Python 2.6 or later):
{{{
--------------------------------------------------------------------------
{% with
pv = [(a[0].strip(), a[1].strip()) for a in [b.split(':') for b in
[c.strip() for c in
ticket_props.replace('|', '\n').splitlines()[1:-1]] if ':' in b]];
sel = ['Reporter', 'Owner', 'Type', 'Status', 'Priority', 'Milestone',
'Component', 'Severity', 'Resolution', 'Keywords'] %}\
${'\n'.join('%s\t%s' % (format(p[0]+':', ' <12'), p[1]) for p in pv if p[0] in sel)}
{% end %}\
--------------------------------------------------------------------------
}}}
The table of ticket properties is replaced with a list of a selection of the properties. A tab character separates the name and value in such a way that most people should find this more pleasing than the default table when using MS Outlook.
{{{#!div style="margin: 1em 1.75em; border:1px dotted"
{{{#!html
#42: testing
--------------------------------------------------------------------------
Reporter: | jonas@example.com |
Owner: | anonymous |
Type: | defect |
Status: | assigned |
Priority: | lowest |
Milestone: | 0.9 |
Component: | report system |
Severity: | major |
Resolution: | |
Keywords: |