Why is the email template not saving correctly?