Attachments from template and data. fix #3