Skip to content

Releases: aspose-email-cloud/aspose-email-cloud-dotnet

21.9.0

21 Sep 18:41
Compare
Choose a tag to compare

21.4.0

13 Apr 19:48
Compare
Choose a tag to compare

20.12.0

30 Dec 15:08
Compare
Choose a tag to compare

20.10.0

29 Oct 11:32
Compare
Choose a tag to compare

20.9.0

09 Sep 09:33
Compare
Choose a tag to compare

20.7.0

23 Jul 11:06
Compare
Choose a tag to compare

20.5.0

27 May 14:20
Compare
Choose a tag to compare

20.3.0

16 Mar 09:27
Compare
Choose a tag to compare

20.2.0

26 Feb 12:47
Compare
Choose a tag to compare

20.1 - Model API

28 Jan 10:30
Compare
Choose a tag to compare

The page contains release notes for Aspose.Email Cloud 20.1 – API Reference

New features

Introducing new Model API for VCard, iCalendar and Email message

iCalendar is a MIME type which allows users to exchange and store calendaring and scheduling information such as journal entries, events, free/busy information and to-dos.
In the previous version were only property sets based API. For example, to create iCalendar file using .Net SDK you had to use the following code:

var calendar = new HierarchicalObject("CALENDAR", null, new List<BaseObject>
{
    new PrimitiveObject("LOCATION", null, "location"),
    new PrimitiveObject("STARTDATE", null, startDate.ToString("u")),
    new PrimitiveObject("ENDDATE", null, endDate.ToString("u")),
    new HierarchicalObject("ORGANIZER", null, new List<BaseObject>
    {
        new PrimitiveObject("ADDRESS", null, "organizer@aspose.com"),
        new PrimitiveObject("DISPLAYNAME", null, "Organizer Name")
    }),
    new HierarchicalObject("ATTENDEES", null, new List<BaseObject>
    {
        new IndexedHierarchicalObject("ATTENDEE", null, 0, new List<BaseObject>
        {
            new PrimitiveObject("ADDRESS", null, "attendee@aspose.com"),
            new PrimitiveObject("DISPLAYNAME", null, "Attendee Name")
        })
    })
});

In the current version, we simplified the work with iCalendar files. Now the same object can be represented by using new CalendarDto model:

var calendar = new CalendarDto
{
    Attendees = new List<MailAddress>{new MailAddress("Attendee Name", "attendee@aspose.com", null)},
    Organizer = new MailAddress("Organizer Name", "organizer@aspose.com", null),
    StartDate = startDate,
    EndDate = endDate,
    Location = "location"
};

You can use both ways to work with iCalendar files.

Model API does not have separate methods to operate with attachments. Attachments can be operated directly by transforming files to Base64 strings:

var bytes = File.ReadAllBytes(filePath);
var base64Data = Convert.ToBase64String(bytes);
calendar.Attachments.Add(new Attachment
{
    Base64Data = base64Data,
    Name = "attachment-name.txt"
});

More examples available on SDK wiki pages: .Net, Java, Python, Ruby, Typescript, PHP

Files conversion

Aspose.Email Cloud supports MSG, MHTM, HTML and EML file formats to store emails. Now new methods to convert such files are available. For example, to convert EML to MSG, you can use the following code:

Stream convertedFile = await emailApi.ConvertEmailAsync(
    new ConvertEmailRequest("Msg", File.OpenRead("eml/file/on/disk")));

More details on SDK wiki pages: .Net, Java, Python, Ruby, Typescript, PHP
Also, we added iCalendar to AlternateView converter. Now it can be properly attached to an email message:

var alternate = await emailApi.ConvertCalendarModelToAlternateAsync(
    new ConvertCalendarModelToAlternateRequest(
        new CalendarDtoAlternateRq(calendar, "Create", null)));
email.AlternateViews.Add(alternate);

SDK changes