Skip to main content
All CollectionsSigParser for DevelopersGetting Started
Nuget package with On Premise Email Parsing APIs and C#
Nuget package with On Premise Email Parsing APIs and C#
Updated over 10 months ago

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()}");
}

Did this answer your question?