Encode error message of sending email  HttpUtility.JavaScriptStringEncode(restResponse.Content)