When using the Nuget package to consume the on premise email parsing APIs you'll need to modify the code slightly from the example.
using System; using System.Diagnostics; using SigParser.Api; using SigParser.Client; using SigParser.Model; // Configure API key authorization: x-api-key Configuration.ApiKey.Add("x-api-key", "DOES NOT MATTER IF ON PREMISE"); Console.WriteLine("Starting"); try { var apiInstance = new ParseApi(basePath: "http://localhost:5000"); using var filestream = System.IO.File.OpenRead("example.msg"); IPaasAPIModelsParseEmailSignatureV2Model result = apiInstance.ApiParseEmailContactMSGPost(filestream); Console.WriteLine("Finished request"); Console.WriteLine(result); } catch (ApiException e) { Console.WriteLine($@"Exception when calling ParseApi.ApiParseEmailContactMSGPost: {e.ErrorCode} {e.ErrorContent} {e.ToString()}"); }
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article