Aspose.Email-Cloud 20.1.0

Aspose.Email Cloud is a REST API for creating email applications that work with common email file formats. It lets developers manipulate message formats such as Outlook MSG, EML and MHT files.

There is a newer version of this package available.
See the version list below for details.
Install-Package Aspose.Email-Cloud -Version 20.1.0
dotnet add package Aspose.Email-Cloud --version 20.1.0
<PackageReference Include="Aspose.Email-Cloud" Version="20.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aspose.Email-Cloud --version 20.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

This SDK allows you to work with Aspose.Email Cloud REST APIs in your .NET applications quickly and easily, with zero initial cost.

Aspose.Email Cloud home
API Reference

Key features

Aspose.Email Cloud is a REST API for creating email applications that work with standard email file formats. This SDK:

  • Lets developers manipulate different emails’ formats such as Outlook MSG, EML, VCard, and iCalendar files
  • Has a built-in email client
  • Supports AI functionalities:
    • The Business card recognition
    • The Name API for parsing and handling personal names

How to use the SDK?

The complete source code is available in the GIT repository.
Use reference documentation, available here

Prerequisites

To use this SDK, you need:

  • One of supported (or compatible with supported) .NET frameworks:
    • .NETFramework 2.0
    • .NETFramework 4.5.2
    • .NETStandard 2.0
    • MonoAndroid 6.0
    • Xamarin.iOS 1.0
    • Xamarin.Mac 2.0
  • An App SID and an App Key; they can be looked up at Aspose Cloud Dashboard (it requires free registration in Aspose Cloud for this).

Usage examples

To use the API, you should create an EmailApi object:

using Aspose.Email.Cloud.Sdk.Api; //EmailApi class is here
using Aspose.Email.Cloud.Sdk.Model; //REST API models are here
using Aspose.Email.Cloud.Sdk.Model.Requests; //Request models are here (all API calls use corresponding request model class)

...
var appKey = "Your App Key";
var appSid = "Your App SID";
var emailApi = new EmailApi(appKey, appSid);

API calls can be synchronous or asynchronous (if it's supported by the framework):

var result = emailApi.GetCalendar(new GetCalendarRequest(calendarFile, folder, StorageName));
// or
var result = await emailApi.GetCalendarAsync(new GetCalendarRequest(calendarFile, folder, StorageName));

Some examples are listed below and most of them are available on wiki

Business cards recognition API

Parse images:

//Read image from file and convert it to Base64 string
var bytes = File.ReadAllBytes("some/business/card/image/file/on/disk");
var base64Image = Convert.ToBase64String(bytes);
var result = await emailApi.AiBcrParseAsync(new AiBcrParseRequest(new AiBcrBase64Rq(null,
    new List<AiBcrBase64Image> {new AiBcrBase64Image(true, base64Image)})));
//Result contains all recognized VCard objects (only the one in our case)
var contactProperties = result.Value.First();

//VCard object is available as a list of properties, without any external calls:
var primitiveProperties = contactProperties.InternalProperties
    .Where(property => property is PrimitiveObject)
    .Select(property => property as PrimitiveObject)
    .ToList();
foreach(var primitiveProperty in primitiveProperties)
{
    System.Console.WriteLine($"Property name: {primitiveProperty.Name}, value: {primitiveProperty.Value}");
}
Name API

See examples below:
Detect a person's gender by name

var name = "John Cane";
var result = await emailApi.AiNameGenderizeAsync(
    new AiNameGenderizeRequest(name));
// the result contains a list of hypothesis about a person's gender.
// all hypothesis include score, so you can use the most scored version,
// which will be the first in a list:
System.Console.WriteLine(result.Value.First().Gender); //prints "Male"

Format person's name using defined format

var result = await emailApi.AiNameFormatAsync(
    new AiNameFormatRequest(
        "Mr. John Michael Cane",
        format:"%t%L%f%m"));
System.Console.WriteLine(result.Name); //prints "Mr. Cane J. M."

Compare the names to find out if they belong to the same person or not

const string first = "John Michael Cane";
const string second = "Cane J.";
var result = await emailApi.AiNameMatchAsync(
    new AiNameMatchRequest(first, second));
System.Console.WriteLine(result.Similarity > 0.5); //prints "true", names look similar

Resources

This SDK allows you to work with Aspose.Email Cloud REST APIs in your .NET applications quickly and easily, with zero initial cost.

Aspose.Email Cloud home
API Reference

Key features

Aspose.Email Cloud is a REST API for creating email applications that work with standard email file formats. This SDK:

  • Lets developers manipulate different emails’ formats such as Outlook MSG, EML, VCard, and iCalendar files
  • Has a built-in email client
  • Supports AI functionalities:
    • The Business card recognition
    • The Name API for parsing and handling personal names

How to use the SDK?

The complete source code is available in the GIT repository.
Use reference documentation, available here

Prerequisites

To use this SDK, you need:

  • One of supported (or compatible with supported) .NET frameworks:
    • .NETFramework 2.0
    • .NETFramework 4.5.2
    • .NETStandard 2.0
    • MonoAndroid 6.0
    • Xamarin.iOS 1.0
    • Xamarin.Mac 2.0
  • An App SID and an App Key; they can be looked up at Aspose Cloud Dashboard (it requires free registration in Aspose Cloud for this).

Usage examples

To use the API, you should create an EmailApi object:

using Aspose.Email.Cloud.Sdk.Api; //EmailApi class is here
using Aspose.Email.Cloud.Sdk.Model; //REST API models are here
using Aspose.Email.Cloud.Sdk.Model.Requests; //Request models are here (all API calls use corresponding request model class)

...
var appKey = "Your App Key";
var appSid = "Your App SID";
var emailApi = new EmailApi(appKey, appSid);

API calls can be synchronous or asynchronous (if it's supported by the framework):

var result = emailApi.GetCalendar(new GetCalendarRequest(calendarFile, folder, StorageName));
// or
var result = await emailApi.GetCalendarAsync(new GetCalendarRequest(calendarFile, folder, StorageName));

Some examples are listed below and most of them are available on wiki

Business cards recognition API

Parse images:

//Read image from file and convert it to Base64 string
var bytes = File.ReadAllBytes("some/business/card/image/file/on/disk");
var base64Image = Convert.ToBase64String(bytes);
var result = await emailApi.AiBcrParseAsync(new AiBcrParseRequest(new AiBcrBase64Rq(null,
    new List<AiBcrBase64Image> {new AiBcrBase64Image(true, base64Image)})));
//Result contains all recognized VCard objects (only the one in our case)
var contactProperties = result.Value.First();

//VCard object is available as a list of properties, without any external calls:
var primitiveProperties = contactProperties.InternalProperties
    .Where(property => property is PrimitiveObject)
    .Select(property => property as PrimitiveObject)
    .ToList();
foreach(var primitiveProperty in primitiveProperties)
{
    System.Console.WriteLine($"Property name: {primitiveProperty.Name}, value: {primitiveProperty.Value}");
}
Name API

See examples below:
Detect a person's gender by name

var name = "John Cane";
var result = await emailApi.AiNameGenderizeAsync(
    new AiNameGenderizeRequest(name));
// the result contains a list of hypothesis about a person's gender.
// all hypothesis include score, so you can use the most scored version,
// which will be the first in a list:
System.Console.WriteLine(result.Value.First().Gender); //prints "Male"

Format person's name using defined format

var result = await emailApi.AiNameFormatAsync(
    new AiNameFormatRequest(
        "Mr. John Michael Cane",
        format:"%t%L%f%m"));
System.Console.WriteLine(result.Name); //prints "Mr. Cane J. M."

Compare the names to find out if they belong to the same person or not

const string first = "John Michael Cane";
const string second = "Cane J.";
var result = await emailApi.AiNameMatchAsync(
    new AiNameMatchRequest(first, second));
System.Console.WriteLine(result.Similarity > 0.5); //prints "true", names look similar

Resources

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
20.3.0 33 3/16/2020
20.2.0 58 2/26/2020
20.1.0 113 1/28/2020
19.12.0 110 12/31/2019
19.11.0 65 11/25/2019
18.7.0 307 8/27/2018
1.0.8 341 9/27/2017
1.0.7 272 9/27/2017
1.0.6 314 8/14/2017
1.0.5 529 1/6/2017
1.0.4 341 11/2/2016
1.0.3 440 11/2/2016
1.0.2 342 10/21/2016
1.0.1 431 2/26/2016
1.0.0 406 2/26/2016