Apply a Template to an Envelope