Sending emails from templates now works