[bug 851070] Fix context creation

This puts the things in the context that need to get rendered in
the email template.