Fix for email sending
Changes to template