Attributes for email templates rendered conditionally, more added

This fixes #368 @ChrisBr @hennevogel please review
@ChrisBr could you elaborate I did understood what you said here??